happydoc-checkins Mailing List for HappyDoc (Page 13)
Brought to you by:
doughellmann,
krlosaqp
You can subscribe to this list here.
2002 |
Jan
(3) |
Feb
(40) |
Mar
(1) |
Apr
|
May
(12) |
Jun
(4) |
Jul
|
Aug
(39) |
Sep
|
Oct
(4) |
Nov
(49) |
Dec
(78) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2003 |
Jan
(54) |
Feb
|
Mar
(41) |
Apr
(1) |
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2006 |
Jan
|
Feb
|
Mar
|
Apr
(3) |
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
(13) |
From: Doug H. <dou...@us...> - 2002-02-17 12:45:02
|
Update of /cvsroot/happydoc/HappyDoc/happydoclib In directory usw-pr-cvs1:/tmp/cvs-serv27359/happydoclib Modified Files: CommandLineApp.py Log Message: Imported changes from pybox version. Index: CommandLineApp.py =================================================================== RCS file: /cvsroot/happydoc/HappyDoc/happydoclib/CommandLineApp.py,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** CommandLineApp.py 24 Dec 2001 19:02:54 -0000 1.7 --- CommandLineApp.py 17 Feb 2002 12:44:58 -0000 1.8 *************** *** 66,69 **** --- 66,70 ---- # import getopt + import pprint import sys import string *************** *** 180,183 **** --- 181,185 ---- self.showHelp(message) raise getopt.error, message + return def constructOptionInfo(self, methodName, methodRef): *************** *** 257,264 **** if option[0] == '-h': self.showHelp() ! raise CommandLineApp.HelpRequested, 'Help message was printed.' if option[0] == '--help': self.showVerboseHelp() ! raise CommandLineApp.HelpRequested, 'Help message was printed.' def main(self, *args): --- 259,266 ---- if option[0] == '-h': self.showHelp() ! raise self.HelpRequested, 'Help message was printed.' if option[0] == '--help': self.showVerboseHelp() ! raise self.HelpRequested, 'Help message was printed.' def main(self, *args): *************** *** 388,392 **** # Print the argument description # ! helpMsg = '%s\n\t%s' % (helpMsg, self.shortArgumentsDescription) # helpMsg = '%s\n\n' % helpMsg --- 390,395 ---- # Print the argument description # ! if self.shortArgumentsDescription: ! helpMsg = '%s\n\n\t\t%s' % (helpMsg, self.shortArgumentsDescription) # helpMsg = '%s\n\n' % helpMsg *************** *** 419,424 **** description_prefix = ' ' - docStringLines = string.split(docString, '\n') optionString = '%s%s' % (baseString, description_prefix) if docStringLines: --- 422,427 ---- description_prefix = ' ' optionString = '%s%s' % (baseString, description_prefix) + docStringLines = string.split(docString, '\n') if docStringLines: *************** *** 488,494 **** --- 491,506 ---- '' ) + + # + # Get a list of all unique option *names* # allOptionNames = self.allOptions.keys() allOptionNames.sort() + + # + # Figure out which options are aliases + # + option_aliases = {} + reduced_options = [] for option in allOptionNames: optName, optTakesValue, optLongOrShort, ignore, ignore = \ *************** *** 496,527 **** methodName = self.methodNameFromOption(option) method = self.methodReferenceFromName(methodName) ! docString = method.__doc__ ! if optTakesValue == self.optTakesParam: ! valueInsert = method.func_code.co_varnames[1] ! else: ! valueInsert = '' ! if optLongOrShort == self.optTypeLong: ! dashInsert = '--' ! if valueInsert: ! valueInsert = '=%s' % valueInsert ! else: ! dashInsert = '-' ! if valueInsert: ! valueInsert = ' %s' % valueInsert helpMsg = string.join( [ helpMsg, ! self.getOptionHelpString(dashInsert, ! option, ! valueInsert, ! docString) ], ! '') ! #self.showOptionHelp(dashInsert, option, valueInsert, docString) ! helpMsg = helpMsg + '\n' if self.argumentsDescription: helpMsg = '%sARGUMENTS:\n\n%s\n\n' % (helpMsg, self.argumentsDescription) ! #print 'ARGUMENTS:' ! #print '' ! #print self.argumentsDescription ! #print '' return helpMsg --- 508,571 ---- methodName = self.methodNameFromOption(option) method = self.methodReferenceFromName(methodName) ! existing_aliases = option_aliases.get(method, []) ! if not existing_aliases: ! reduced_options.append(option) ! existing_aliases.append(option) ! option_aliases[method] = existing_aliases ! ! grouped_options = [ x[1] for x in option_aliases.items() ] ! grouped_options.sort() ! ! # ! # Describe all options, grouping aliases together ! # ! ! for option_set in grouped_options: ! first_option = option_set[0] ! # ! # Build the list of option name/parameter strings ! # ! option_help_strings = [] ! for option in option_set: ! optName, optTakesValue, optLongOrShort, ignore, ignore = \ ! self.infoForOption(option) ! methodName = self.methodNameFromOption(option) ! method = self.methodReferenceFromName(methodName) ! if optTakesValue == self.optTakesParam: ! valueInsert = method.func_code.co_varnames[1] ! else: ! valueInsert = '' ! if optLongOrShort == self.optTypeLong: ! dashInsert = '--' ! if valueInsert: ! valueInsert = '=%s' % valueInsert ! else: ! dashInsert = '-' ! if valueInsert: ! valueInsert = ' %s' % valueInsert ! option_help_strings.append('%s%s%s' % (dashInsert, ! optName, ! valueInsert, ! ) ! ) ! option_help_string = ', '.join(option_help_strings) ! ! methodName = self.methodNameFromOption(first_option) ! method = self.methodReferenceFromName(methodName) ! docString = method.__doc__.rstrip() helpMsg = string.join( [ helpMsg, ! self.getOptionHelpString('', ! option_help_string, ! '', ! docString, ! ) ! ], ! '') ! helpMsg = helpMsg + '\n' ! if self.argumentsDescription: helpMsg = '%sARGUMENTS:\n\n%s\n\n' % (helpMsg, self.argumentsDescription) ! return helpMsg *************** *** 565,570 **** "Display help message when error occurs." print ! print '%s version %s' % (self.__class__.__name__, self._app_version) print # # If they made a syntax mistake, just --- 609,618 ---- "Display help message when error occurs." print ! if self._app_version: ! print '%s version %s' % (self.__class__.__name__, self._app_version) ! else: ! print self.__class__.__name__ print + # # If they made a syntax mistake, just *************** *** 730,734 **** SubClassTestApp version 0.0 ! ./test_happydoc.py [-hbqvz] [-a newA] [--help] --- 778,782 ---- SubClassTestApp version 0.0 ! %s [-hbqvz] [-a newA] [--help] *************** *** 736,745 **** [--long-form-with-value=optValue] [--option-list=optionList] - For more details, use --help. ! """ assert help_text == expected_help_text, \ 'Unexpected help text "%s" does not match "%s"' % (help_text, expected_help_text) --- 784,792 ---- [--long-form-with-value=optValue] [--option-list=optionList] For more details, use --help. ! """ % sys.argv[0] assert help_text == expected_help_text, \ 'Unexpected help text "%s" does not match "%s"' % (help_text, expected_help_text) *************** *** 749,754 **** help_text = self.runAndCatchOutput(['--help']) expected_help_text = """ ! ./test_happydoc.py --- 796,802 ---- help_text = self.runAndCatchOutput(['--help']) + app = sys.argv[0] expected_help_text = """ ! %(app)s *************** *** 758,762 **** SYNTAX: ! ./test_happydoc.py [-hbqvz] [-a newA] [--help] --- 806,810 ---- SYNTAX: ! %(app)s [-hbqvz] [-a newA] [--help] *************** *** 764,768 **** [--long-form-with-value=optValue] [--option-list=optionList] - OPTIONS: --- 812,815 ---- *************** *** 774,782 **** --- 821,832 ---- -a newA Doc string for SubClassTestApp + -b toggle the value of b + --long-form-option boolean option + --long-form-with-value=optValue First line of help. *************** *** 785,797 **** Default:<manually inserted> --option-list=optionList Doc string for SubClassTestApp -q Turn on quiet mode. -v Increment the verbose level. Higher levels are more verbose. The default is 1. ! -z Doc string for SubClassTestApp --- 835,850 ---- Default:<manually inserted> + --option-list=optionList Doc string for SubClassTestApp + -q Turn on quiet mode. + -v Increment the verbose level. Higher levels are more verbose. The default is 1. ! -z Doc string for SubClassTestApp *************** *** 810,815 **** ! """ ! assert help_text == expected_help_text, 'Unexpected help text "%s"' % help_text return --- 863,868 ---- ! """ % locals() ! assert help_text == expected_help_text, 'Unexpected help text "%s" does not match "%s"' % (help_text, expected_help_text) return |
From: Doug H. <dou...@us...> - 2002-02-10 13:37:16
|
Update of /cvsroot/happydoc/HappyDoc/happydoclib/formatter In directory usw-pr-cvs1:/tmp/cvs-serv11703/happydoclib/formatter Modified Files: formatter_HTMLFile.py Log Message: Potential fix for defect 515232, to convert platform-specific filenames to URL paths. Index: formatter_HTMLFile.py =================================================================== RCS file: /cvsroot/happydoc/HappyDoc/happydoclib/formatter/formatter_HTMLFile.py,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** formatter_HTMLFile.py 3 Feb 2002 18:50:09 -0000 1.4 --- formatter_HTMLFile.py 10 Feb 2002 13:37:12 -0000 1.5 *************** *** 192,195 **** --- 192,208 ---- ## + def _fixReference(self, reference, sep=os.sep): + """All HTML links use the '/' separator, so here the current + platform separator needs to be replaced with the '/'. + """ + happydoclib.TRACE.into('HTMLTableFormatter', '_fixReference', + reference=reference) + new_ref = reference.replace(sep, '/') + if sep == ':': + if new_ref[:4] == 'http': + new_ref = 'http://%s' % new_ref[5:] + return happydoclib.TRACE.outof(new_ref) + + def getReference(self, infoSource, relativeSource, name=None): """Returns a reference to the 'infoSource' from 'relativeSource'. *************** *** 201,205 **** if not name: name = self.getNameForInfoSource( infoSource ) ! #print 'FORMATTER_HTMLFILE: getReference(', name, ',', relativeSource, ')' info_source_path = self.getOutputNameForObject( infoSource ) link = happydoclib.path.computeRelativeHTMLLink( --- 214,221 ---- if not name: name = self.getNameForInfoSource( infoSource ) ! happydoclib.TRACE.into('HTMLTableFormatter', 'getReference', ! name=name, ! relativeSource=relativeSource, ! ) info_source_path = self.getOutputNameForObject( infoSource ) link = happydoclib.path.computeRelativeHTMLLink( *************** *** 208,214 **** self._docset.getOutputBaseDirectory() ) ! #print 'FORMATTER_HTMLFILE: link to %s: %s' % (name, link) ! #if link[0] == '/': ! # print 'FORMATTER_HTMLFILE: STARTS AT ROOT' info = { --- 224,232 ---- self._docset.getOutputBaseDirectory() ) ! happydoclib.TRACE.write('link to %s: %s' % (name, link)) ! if link[0] == '/': ! happydoclib.TRACE.write('starts at root') ! ! link = self._fixReference(link) info = { *************** *** 217,221 **** } ref = '<a href="%(link)s">%(name)s</a>' % info ! return ref def getNamedReference(self, infoSource, name, relativeSource): --- 235,240 ---- } ref = '<a href="%(link)s">%(name)s</a>' % info ! return happydoclib.TRACE.outof(ref) ! def getNamedReference(self, infoSource, name, relativeSource): *************** *** 223,229 **** 'infoSource' from 'relativeSource'. """ ! #print '\nFORMATTER: getNamedReference(', \ ! # infoSource.getName(), ',', name, ',', relativeSource, ')' ! #print '\toutput name:', self.getOutputNameForObject(infoSource) link = happydoclib.path.computeRelativeHTMLLink( --- 242,251 ---- 'infoSource' from 'relativeSource'. """ ! happydoclib.TRACE.into('HTMLTableFormatter', 'getNamedReference', ! infoSource=infoSource.getName(), ! name=name, ! relativeSource=relativeSource, ! ) ! happydoclib.TRACE.writeVar(output_name=self.getOutputNameForObject(infoSource)) link = happydoclib.path.computeRelativeHTMLLink( *************** *** 232,236 **** self._docset.getOutputBaseDirectory() ) ! #print '\tLINK:', link info = { 'name':infoSource.getName(), --- 254,262 ---- self._docset.getOutputBaseDirectory() ) ! ! happydoclib.TRACE.writeVar(link=link) ! ! link = self._fixReference(link) ! info = { 'name':infoSource.getName(), *************** *** 239,244 **** } ref = '<a href="%(link)s#%(target)s">%(target)s</a>' % info ! #print '\tREF:', ref ! return ref def getInternalReference(self, infoSource): --- 265,271 ---- } ref = '<a href="%(link)s#%(target)s">%(target)s</a>' % info ! ! return happydoclib.TRACE.outof(ref) ! def getInternalReference(self, infoSource): *************** *** 461,466 **** else: root_node_name = 'index.html' ! happydoclib.TRACE.outof(root_node_name) ! return root_node_name ## --- 488,492 ---- else: root_node_name = 'index.html' ! return happydoclib.TRACE.outof(root_node_name) ## *************** *** 782,787 **** (reference, expected_reference) return ! ! if __name__ == '__main__': --- 808,853 ---- (reference, expected_reference) return ! ! def testFixReferencesWindows(self): ! filenames = [ os.path.join(os.curdir, 'happydoclib', 'CommandLineApp.py') ] ! import happydoclib.parseinfo ! import happydoclib.happydocset ! docset = happydoclib.happydocset.DocSet( ! formatterFactory=HTMLTableFormatter, ! parserFunc=happydoclib.parseinfo.getDocs, ! defaultParserConfigValues={'docStringFormat':'StructuredText'}, ! inputModuleNames=filenames, ! outputBaseDirectory=self.output_dir, ! ) ! cla = docset[0] ! formatter = docset._formatter ! ! input = 'http:\\\\full\\url\\path\\index.html' ! expected = 'http://full/url/path/index.html' ! actual = formatter._fixReference(input, sep='\\') ! assert expected == actual, \ ! 'Fixing Windows URL failed (%s, %s)' % (expected, actual) ! return ! ! def testFixReferencesMacOS(self): ! filenames = [ os.path.join(os.curdir, 'happydoclib', 'CommandLineApp.py') ] ! import happydoclib.parseinfo ! import happydoclib.happydocset ! docset = happydoclib.happydocset.DocSet( ! formatterFactory=HTMLTableFormatter, ! parserFunc=happydoclib.parseinfo.getDocs, ! defaultParserConfigValues={'docStringFormat':'StructuredText'}, ! inputModuleNames=filenames, ! outputBaseDirectory=self.output_dir, ! ) ! cla = docset[0] ! formatter = docset._formatter ! ! input = 'http:full:url:path:index.html' ! expected = 'http://full/url/path/index.html' ! actual = formatter._fixReference(input, sep=':') ! assert expected == actual, \ ! 'Fixing MacOS URL failed (%s, %s)' % (expected, actual) ! return if __name__ == '__main__': |
From: Doug H. <dou...@us...> - 2002-02-10 13:25:52
|
Update of /cvsroot/happydoc/HappyDoc/happydoclib In directory usw-pr-cvs1:/tmp/cvs-serv9607/happydoclib Modified Files: happydocset.py Log Message: Added 'dist' and 'tmp' to directories to be ignored during test for ignoring directories. Index: happydocset.py =================================================================== RCS file: /cvsroot/happydoc/HappyDoc/happydoclib/happydocset.py,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** happydocset.py 2 Feb 2002 13:53:02 -0000 1.7 --- happydocset.py 10 Feb 2002 13:25:49 -0000 1.8 *************** *** 953,956 **** --- 953,958 ---- 'docstring', 'TestCases', + 'dist', + 'tmp', ] docset = DocSet( formatterFactory=happydoclib.formatter.formatter_Null.NullFormatter, |
From: Doug H. <dou...@us...> - 2002-02-10 13:24:55
|
Update of /cvsroot/happydoc/HappyDoc In directory usw-pr-cvs1:/tmp/cvs-serv9438 Modified Files: CHANGES.txt Log Message: Added comments about resolved bugs. Index: CHANGES.txt =================================================================== RCS file: /cvsroot/happydoc/HappyDoc/CHANGES.txt,v retrieving revision 1.28 retrieving revision 1.29 diff -C2 -d -r1.28 -r1.29 *** CHANGES.txt 5 Feb 2002 12:24:45 -0000 1.28 --- CHANGES.txt 10 Feb 2002 13:24:52 -0000 1.29 *************** *** 1,4 **** --- 1,20 ---- HappyDoc Change History + Version 2.0.2 -- + + - **New Features** + + - **Bug Fixes** + + - Resolved defect #510447, a problem with escaping special + characters in HTML output. Text enclosed in single quotes + is now not escaped in output so that HTML text can be + passed directly to the output file. + + - + + - **Other Changes** + + Version 2.0.1 -- *************** *** 47,50 **** --- 63,69 ---- - **Bug Fixes** + + - Resolved bug #478659 so that import statements with comments + following on the same line are picked up. - Fixed a problem with the HTMLTable formatter that caused pages |
From: Doug H. <dou...@us...> - 2002-02-10 13:18:43
|
Update of /cvsroot/happydoc/HappyDoc/happydoclib/docstring In directory usw-pr-cvs1:/tmp/cvs-serv8219/happydoclib/docstring Modified Files: docstring_StructuredText.py Log Message: Added some tests for quoted characters. Changed handling of fixed format code sections using single quotes so that quotable characters are not quoted ( > stays > instead of >, etc.). This is related to defect #510447. Index: docstring_StructuredText.py =================================================================== RCS file: /cvsroot/happydoc/HappyDoc/happydoclib/docstring/docstring_StructuredText.py,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** docstring_StructuredText.py 30 Dec 2001 13:44:07 -0000 1.3 --- docstring_StructuredText.py 10 Feb 2002 13:18:41 -0000 1.4 *************** *** 154,161 **** return else: ! if tag_name == 'StructuredTextExample': actual_para = st.aq_self text = self._unquoteHTML(actual_para._src) actual_para._src = text else: for child in st.getChildNodes(): --- 154,165 ---- return else: ! if tag_name in ('StructuredTextExample',): actual_para = st.aq_self text = self._unquoteHTML(actual_para._src) actual_para._src = text + elif tag_name in ( 'StructuredTextLiteral',): + actual_para = st.aq_self + text = self._unquoteHTML(actual_para._value) + actual_para._value = text else: for child in st.getChildNodes(): *************** *** 257,260 **** --- 261,271 ---- """ + happydoclib.TRACE.into('StructuredTextConverter', + 'quote', + inputText=inputText, + outputFormat=outputFormat, + args=args, + namedArgs=namedArgs, + ) self._testOutputFormat(outputFormat) if outputFormat == 'html': *************** *** 263,266 **** --- 274,278 ---- namedArgs, ) + happydoclib.TRACE.write('AFTER QUOTING="%s"' % html_quoted) # # Replace form: ".*": *************** *** 273,278 **** '"\\1":', html_quoted) return html_quoted ! return inputText --- 285,292 ---- '"\\1":', html_quoted) + happydoclib.TRACE.write('AFTER FIXUP="%s"' % html_quoted) return html_quoted ! ! happydoclib.TRACE.outof(inputText) return inputText *************** *** 625,626 **** --- 639,680 ---- + def testWithQuotableCharacters(self): + input_text = "Here are some quotable characters. & < > < >." + expected_text = '\n<p>Here are some quotable characters. & < > < >.</p>\n' + + self._testConversion( + input_text, + 'StructuredText', + 'html', + expected_text, + 'Converting ST to HTML with quotable characters did not produce expected results.', + ) + + + def testWithQuotableCharactersInExample(self): + input_text = """Here are some quotable characters in example paragraphs + + First, a true example:: + + Begin & < > + + Finally, embedded in a code segment '& < >'. + """ + expected_text = """ + <h3>Here are some quotable characters in example paragraphs</h3> + <p> First, a true example: + <pre> + Begin & < > + </pre> + </p> + <p> Finally, embedded in a code segment '& < >'.</p> + """ + + self._testConversion( + input_text, + 'StructuredText', + 'html', + expected_text, + 'Converting ST to HTML with quotable characters did not produce expected results.', + ) + |
From: Doug H. <dou...@us...> - 2002-02-10 13:07:03
|
Update of /cvsroot/happydoc/HappyDoc/happydoclib/formatter In directory usw-pr-cvs1:/tmp/cvs-serv5992/happydoclib/formatter Modified Files: fileformatterbase.py Log Message: Corrected expected value for test result. Index: fileformatterbase.py =================================================================== RCS file: /cvsroot/happydoc/HappyDoc/happydoclib/formatter/fileformatterbase.py,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** fileformatterbase.py 3 Feb 2002 18:49:26 -0000 1.7 --- fileformatterbase.py 10 Feb 2002 13:07:00 -0000 1.8 *************** *** 436,440 **** def testGetFullOutputNameForObjectNone(self): info_obj = None ! expected = os.sep + os.path.join('docset', 'base', 'directory', --- 436,443 ---- def testGetFullOutputNameForObjectNone(self): info_obj = None ! expected = os.sep + os.path.join('tmp', ! 'fakedocset', ! 'output', ! 'docset', 'base', 'directory', |
From: Doug H. <dou...@us...> - 2002-02-10 13:06:03
|
Update of /cvsroot/happydoc/HappyDoc/happydoclib In directory usw-pr-cvs1:/tmp/cvs-serv5842/happydoclib Modified Files: happydocstring.py Log Message: Fixed assertion in test case to show expected and actual values in case of failure. Index: happydocstring.py =================================================================== RCS file: /cvsroot/happydoc/HappyDoc/happydoclib/happydocstring.py,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** happydocstring.py 24 Oct 2001 21:27:35 -0000 1.1 --- happydocstring.py 10 Feb 2002 13:06:00 -0000 1.2 *************** *** 197,201 **** print '[EXPECTED[%s]EXPECTED]' % expectedText print '[CONVERTED[%s]CONVERTED]' % converted_text ! assert (converted_text == expectedText), errorMessage return --- 197,203 ---- print '[EXPECTED[%s]EXPECTED]' % expectedText print '[CONVERTED[%s]CONVERTED]' % converted_text ! assert (converted_text == expectedText), '%s ("%s", "%s") ' % (errorMessage, ! expectedText, ! converted_text) return |
From: Doug H. <dou...@us...> - 2002-02-10 13:02:28
|
Update of /cvsroot/happydoc/HappyDoc/happydoclib In directory usw-pr-cvs1:/tmp/cvs-serv5262/happydoclib Modified Files: trace.py Log Message: Changed outof() so that it returns the returnValue. This lets us ensure that the outof call is the last call in a function by placing it right in the return statement. Index: trace.py =================================================================== RCS file: /cvsroot/happydoc/HappyDoc/happydoclib/trace.py,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** trace.py 7 Nov 2001 00:00:07 -0000 1.3 --- trace.py 10 Feb 2002 13:02:25 -0000 1.4 *************** *** 199,203 **** self.output.write(self.getIndent()) self.output.write('} %s\n' % str(returnValue)) ! return --- 199,203 ---- self.output.write(self.getIndent()) self.output.write('} %s\n' % str(returnValue)) ! return returnValue |
From: Doug H. <dou...@us...> - 2002-02-10 12:49:23
|
Update of /cvsroot/happydoc/TestCases In directory usw-pr-cvs1:/tmp/cvs-serv2883/TestCases Added Files: test_bug510447.py Log Message: New test file for docstring converter quote tests. --- NEW FILE: test_bug510447.py --- # # $Id: test_bug510447.py,v 1.1 2002/02/10 12:49:19 doughellmann Exp $ # """Defect #510447 Testing HTML conversion of special characters such as less than and greather than. """ def checkQuotes(): """Here is a doc string that includes some quotes. 'Single quotes,' "double quotes". """ pass def checkEqualityOperators(): """Here are some less than and greater than signs. < > < >. """ pass def checkQuotesInExample(): """Here is a doc string with an example. Within the example, we want some double quotes. 'Example "double quotes"' """ pass def checkEqualityOperatorsInExample(): """Less than and greater than signs in an example. 'Example < > < >' """ pass def checkAmpersand(): "There is an ampersand here &." pass |
From: Doug H. <dou...@us...> - 2002-02-07 16:38:02
|
Update of /cvsroot/happydoc/HappyDoc In directory usw-pr-cvs1:/tmp/cvs-serv29184 Modified Files: test_happydoc.py Log Message: Specify 'bugs' as the test name to run all bug tests. Index: test_happydoc.py =================================================================== RCS file: /cvsroot/happydoc/HappyDoc/test_happydoc.py,v retrieving revision 1.81 retrieving revision 1.82 diff -C2 -d -r1.81 -r1.82 *** test_happydoc.py 7 Feb 2002 14:23:37 -0000 1.81 --- test_happydoc.py 7 Feb 2002 16:22:06 -0000 1.82 *************** *** 639,645 **** --- 639,648 ---- get_all_tests = 0 + get_bug_tests = 0 if 'all' in args: # We will define "all" of the tests later get_all_tests = 1 + elif 'bugs' in args: + get_bug_tests = 1 elif args: # Run the tests specified by the user *************** *** 685,688 **** --- 688,692 ---- # Formatters # + happydoclib.formatter.fileformatterbase, happydoclib.formatter.openoffice, happydoclib.formatter.formatter_HTMLFile, *************** *** 702,708 **** ): actual_test_suite.addTest(test_loader.loadTestsFromTestCase(c)) ! # ! # Check tests related to bug reports ! # bug_ids = map(lambda x:x[18:-3], glob(os.path.join('TestCases', 'test_bug*.py'))) bug_ids.sort() --- 706,715 ---- ): actual_test_suite.addTest(test_loader.loadTestsFromTestCase(c)) ! ! ! # ! # Check tests related to bug reports ! # ! if get_all_tests or get_bug_tests: bug_ids = map(lambda x:x[18:-3], glob(os.path.join('TestCases', 'test_bug*.py'))) bug_ids.sort() |
From: Doug H. <dou...@us...> - 2002-02-07 14:26:48
|
Update of /cvsroot/happydoc/HappyDoc/happydoclib In directory usw-pr-cvs1:/tmp/cvs-serv24659 Modified Files: pluginloader.py Log Message: Implemented feature #514237: Changed module lookups in pluginloader to not require .py extension. This should allow plugins to be written in any language for which Python can load a module, and as long as the file is named with the right convention they will be picked up and loaded. (The source of this change request was the maintainers of the PLD Linux Distribution.) Index: pluginloader.py =================================================================== RCS file: /cvsroot/happydoc/HappyDoc/happydoclib/pluginloader.py,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** pluginloader.py 18 Nov 2001 23:14:57 -0000 1.2 --- pluginloader.py 7 Feb 2002 14:26:44 -0000 1.3 *************** *** 134,141 **** # List of plugins # ! _module_list = glob.glob( happydoclib.path.join( self.plugin_dir, ! '%s*py' % self.plugin_set_name, ! ) ! ) _module_list.sort() # --- 134,138 ---- # List of plugins # ! _module_list = self.getModuleList() _module_list.sort() # *************** *** 147,151 **** ) module_name_parts = _module_name.split(os.sep) ! module_base_name = module_name_parts[-1][:-3] plugin_set_name = module_name_parts[-2] if plugin_set_name != self.plugin_set_name: --- 144,148 ---- ) module_name_parts = _module_name.split(os.sep) ! module_base_name = module_name_parts[-1] plugin_set_name = module_name_parts[-2] if plugin_set_name != self.plugin_set_name: *************** *** 155,159 **** TRACE.writeVar(parent_package_name=parent_package_name) ! _module_name = happydoclib.path.basename(_module_name)[:-3] if self.parent_module_prefix: _import_name = '%s.%s.%s' % (self.parent_module_prefix, --- 152,156 ---- TRACE.writeVar(parent_package_name=parent_package_name) ! _module_name = happydoclib.path.basename(_module_name) if self.parent_module_prefix: _import_name = '%s.%s.%s' % (self.parent_module_prefix, *************** *** 204,207 **** --- 201,217 ---- return + def getModuleList(self): + "Return a list of module names to be used as plugins." + glob_pattern = happydoclib.path.join( self.plugin_dir, + '%s_*' % self.plugin_set_name, + ) + all_files = glob.glob(glob_pattern) + all_basenames = [ os.path.splitext(x)[0] for x in all_files] + unique_modules = [] + for module in all_basenames: + if module not in unique_modules: + unique_modules.append(module) + return unique_modules + def addEntryPoint(self, infoDict): """Add an entry point into a module to our lookup tables. |
From: Doug H. <dou...@us...> - 2002-02-07 14:23:40
|
Update of /cvsroot/happydoc/HappyDoc In directory usw-pr-cvs1:/tmp/cvs-serv23608 Modified Files: test_happydoc.py Log Message: Added a basic test for DocBookX formatter. Index: test_happydoc.py =================================================================== RCS file: /cvsroot/happydoc/HappyDoc/test_happydoc.py,v retrieving revision 1.80 retrieving revision 1.81 diff -C2 -d -r1.80 -r1.81 *** test_happydoc.py 3 Feb 2002 21:44:45 -0000 1.80 --- test_happydoc.py 7 Feb 2002 14:23:37 -0000 1.81 *************** *** 196,199 **** --- 196,208 ---- # + + def testDocBookX(self): + assert (not self.runHappyDoc( (os.path.join('TestCases', 'test.py'),), + extraArgs=('-F', + 'docbookx') + ) + ), 'Full self documentation in DocBookS format output test failed.' + return + def testHTMLSimple(self): assert (not self.runHappyDoc( (os.path.join('TestCases', 'test.py'),), *************** *** 312,316 **** ), 'Full self documentation in DocBookS format output test failed.' return - class OtherWorkingDirTest(HappyDocTestBase): --- 321,324 ---- |
From: wrobell <wr...@us...> - 2002-02-07 01:21:06
|
Update of /cvsroot/happydoc/HappyDoc/happydoclib/formatter In directory usw-pr-cvs1:/tmp/cvs-serv32188 Modified Files: formatter_DocBookX.py Log Message: - some api has been changed - fixed - small language improvements - typos Index: formatter_DocBookX.py =================================================================== RCS file: /cvsroot/happydoc/HappyDoc/happydoclib/formatter/formatter_DocBookX.py,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** formatter_DocBookX.py 2002/02/03 21:50:45 1.4 --- formatter_DocBookX.py 2002/02/07 01:21:03 1.5 *************** *** 23,27 **** Example: ! happydoc -T mstruct -F xmldocbook my_module formatter_encoding=utf-8 xsltproc --xinclude my_custom_docbook_to_html.xsl my_module/index.docb > my_module.html --- 23,27 ---- Example: ! happydoc -T mstruct -F docbookx my_module formatter_encoding=utf-8 xsltproc --xinclude my_custom_docbook_to_html.xsl my_module/index.docb > my_module.html *************** *** 129,134 **** if stage==START: self.tag('section', output, {'xmlns:xi': 'http://www.w3.org/2001/XInclude'}) ! name=info.getFullyQualifiedName(self.getFilenamePrefix()) ! name=string.replace(name, '/', '.')[:len(name)-3] self.writeTaggedText('title', 'Module %s' % name, output) elif stage==END: --- 129,134 ---- if stage==START: self.tag('section', output, {'xmlns:xi': 'http://www.w3.org/2001/XInclude'}) ! name=info.getFullyQualifiedName() ! name=string.replace(name, '/', '.')[:-3] self.writeTaggedText('title', 'Module %s' % name, output) elif stage==END: *************** *** 271,275 **** pname=package_info.getName() else: ! pname=package_info.getFileName() name='%s/%s#%s' \ --- 271,275 ---- pname=package_info.getName() else: ! pname=package_info.getFilename() name='%s/%s#%s' \ |
From: wrobell <wr...@us...> - 2002-02-07 01:19:14
|
Update of /cvsroot/happydoc/HappyDoc/happydoclib/formatter In directory usw-pr-cvs1:/tmp/cvs-serv31444 Modified Files: xmlformatterbase.py Log Message: - textFormat param defaults to None in writeText method; it is not used by formatters at now Index: xmlformatterbase.py =================================================================== RCS file: /cvsroot/happydoc/HappyDoc/happydoclib/formatter/xmlformatterbase.py,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** xmlformatterbase.py 2002/02/03 21:50:11 1.2 --- xmlformatterbase.py 2002/02/07 01:19:11 1.3 *************** *** 205,209 **** ! def writeText(self, text, output, textFormat, quote=1): """Outputs text to XML file. --- 205,209 ---- ! def writeText(self, text, output, textFormat=None, quote=1): """Outputs text to XML file. |
From: wrobell <wr...@us...> - 2002-02-07 01:18:02
|
Update of /cvsroot/happydoc/HappyDoc/happydoclib/docset In directory usw-pr-cvs1:/tmp/cvs-serv31264 Modified Files: docset_mstruct.py Log Message: - some api has been changed - fix it Index: docset_mstruct.py =================================================================== RCS file: /cvsroot/happydoc/HappyDoc/happydoclib/docset/docset_mstruct.py,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** docset_mstruct.py 2002/02/07 01:05:54 1.2 --- docset_mstruct.py 2002/02/07 01:17:56 1.3 *************** *** 173,177 **** output_name=self._formatter.getFullOutputNameForObject(module) ! output=self.openOutput(output_name, 'Module: %s' % module_name, module.getFileName(), MODULE_FILE) # start the module tag --- 173,177 ---- output_name=self._formatter.getFullOutputNameForObject(module) ! output=self.openOutput(output_name, 'Module: %s' % module_name, module.getFilename(), MODULE_FILE) # start the module tag *************** *** 206,210 **** class_output_name=formatter.getFullOutputNameForObject(c) class_output=self.openOutput(class_output_name, 'Class: %s' % class_name, \ ! module.getFileName(), CLASS_FILE) self._writeClass(module, class_name, class_output) self.closeOutput(class_output, CLASS_FILE) --- 206,210 ---- class_output_name=formatter.getFullOutputNameForObject(c) class_output=self.openOutput(class_output_name, 'Class: %s' % class_name, \ ! module.getFilename(), CLASS_FILE) self._writeClass(module, class_name, class_output) self.closeOutput(class_output, CLASS_FILE) |
From: wrobell <wr...@us...> - 2002-02-07 01:05:57
|
Update of /cvsroot/happydoc/HappyDoc/happydoclib/docset In directory usw-pr-cvs1:/tmp/cvs-serv27920 Modified Files: docset_mstruct.py Log Message: - use correct module path Index: docset_mstruct.py =================================================================== RCS file: /cvsroot/happydoc/HappyDoc/happydoclib/docset/docset_mstruct.py,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** docset_mstruct.py 2001/10/24 21:27:35 1.1 --- docset_mstruct.py 2002/02/07 01:05:54 1.2 *************** *** 73,77 **** def __init__(self, **args): ! happydocset.DocSet.__init__(self, **args) --- 73,77 ---- def __init__(self, **args): ! happydoclib.happydocset.DocSet.__init__(self, **args) |
From: Doug H. <dou...@us...> - 2002-02-05 19:59:40
|
Update of /cvsroot/happydoc/HappyDoc In directory usw-pr-cvs1:/tmp/cvs-serv23206 Modified Files: setup.py Log Message: Windows does not seem to find the happydoclib package during installation, so it cannot find the cvsProductVersion() function. Copied that code to the local module to eliminate the problem. Index: setup.py =================================================================== RCS file: /cvsroot/happydoc/HappyDoc/setup.py,v retrieving revision 1.10 retrieving revision 1.11 diff -C2 -d -r1.10 -r1.11 *** setup.py 2001/11/12 21:48:11 1.10 --- setup.py 2002/02/05 19:59:36 1.11 *************** *** 3,7 **** # $Id$ # ! # Time-stamp: <01/11/12 16:37:27 dhellmann> # # Copyright 2001 Doug Hellmann. --- 3,7 ---- # $Id$ # ! # Time-stamp: <02/02/05 10:00:12 dhellmann> # # Copyright 2001 Doug Hellmann. *************** *** 57,60 **** --- 57,61 ---- # from distutils.core import setup + import string import sys *************** *** 62,66 **** # Import Local modules # - from happydoclib.cvsversion import cvsProductVersion # --- 63,66 ---- *************** *** 70,74 **** BSD_LICENSE=""" ! Copyright 2001 Doug Hellmann. All Rights Reserved --- 70,74 ---- BSD_LICENSE=""" ! Copyright 2001, 2002 Doug Hellmann. All Rights Reserved *************** *** 100,103 **** --- 100,124 ---- context to be imported. """ + + + def cvsProductVersion(cvsVersionString='$Name$'): + """Function to return the version number of the program. + + The value is taken from the CVS tag, assuming the tag has the form: + + rX_Y_Z + + Where X is the major version number, Y is the minor version + number, and Z is the optional sub-minor version number. + """ + cvs_version_parts=string.split(cvsVersionString) + if len(cvs_version_parts) >= 3: + app_version = string.strip(cvs_version_parts[1]).replace('_', '.') + if app_version and app_version[0] == 'r': + app_version = app_version[1:] + else: + app_version = 'WORKING' + return app_version + |
From: Doug H. <dou...@us...> - 2002-02-05 16:08:07
|
Update of /cvsroot/happydoc/HappyDoc In directory usw-pr-cvs1:/tmp/cvs-serv17826 Modified Files: README.txt Log Message: Added reference to NOAA SEC as a user. Index: README.txt =================================================================== RCS file: /cvsroot/happydoc/HappyDoc/README.txt,v retrieving revision 1.46 retrieving revision 1.47 diff -C2 -d -r1.46 -r1.47 *** README.txt 2001/12/16 12:13:53 1.46 --- README.txt 2002/02/05 16:02:07 1.47 *************** *** 265,268 **** --- 265,275 ---- graphics. + - **NOAA SEC** + + The NOAA "Space Environment Center":http://www.sec.noaa.gov/sxi + group responsible for supporting the effort to forecast solar + activity having a direct impact on earth-orbiting satellites and + other earth-based systems. + Bugs |
From: Doug H. <dou...@us...> - 2002-02-05 12:47:26
|
Update of /cvsroot/happydoc/HappyDoc/misc In directory usw-pr-cvs1:/tmp/cvs-serv1550 Modified Files: ANNOUNCE.txt Log Message: Added special note about win32 bug. Index: ANNOUNCE.txt =================================================================== RCS file: /cvsroot/happydoc/HappyDoc/misc/ANNOUNCE.txt,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** ANNOUNCE.txt 2002/02/05 12:24:45 1.4 --- ANNOUNCE.txt 2002/02/05 12:47:23 1.5 *************** *** 20,23 **** --- 20,27 ---- Version 2.0.1 -- + The primary reason for this release is to resolve several bugs + which prevented Win32 support from working properly. Support for + Win32 operating systems should now be restored. + - **New Features** |
From: Doug H. <dou...@us...> - 2002-02-05 12:24:49
|
Update of /cvsroot/happydoc/HappyDoc/misc In directory usw-pr-cvs1:/tmp/cvs-serv28570/misc Modified Files: ANNOUNCE.txt Log Message: updated for 2.0.1 release Index: ANNOUNCE.txt =================================================================== RCS file: /cvsroot/happydoc/HappyDoc/misc/ANNOUNCE.txt,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** ANNOUNCE.txt 2001/12/30 12:28:17 1.3 --- ANNOUNCE.txt 2002/02/05 12:24:45 1.4 *************** *** 18,55 **** in the 'bin' directory. ! Version 2.0 -- - **New Features** ! - Rearranged much of the code base to create 'happydoclib' ! package. This package protects the namespace for HappyDoc ! related code, and makes it easier to reuse HappyDoc components ! in other projects. ! ! - Package descriptions can now come from the docstring of the ! '__init__.py' module, instead of always having to be in a README ! file. - **Bug Fixes** ! - Fixed a problem with the HTMLTable formatter that caused pages ! to look odd in browsers which don't handle width attributes the ! same way as Netscape. ! - Upgraded to newer version of StructuredText package from Zope ! CVS, resolving several rendering issues for the HTML formatter. ! - **Other Changes** ! - Changed command line argument handling to use '-' character in ! names in addtition to underscore. That is, defining an ! optionHandler_long_opt will allow the app to accept '--long-opt' ! or '--long_opt'. The help text uses the '-' form, but both ! are allowed on the command line for backwards compatability. ! - Updated test cases to streamline regression testing. ! - Rearranged some of the documentation from the root ! 'README.txt' into sub-packages. --- 18,51 ---- in the 'bin' directory. ! Version 2.0.1 -- - **New Features** ! - Added limited support for CGI programs by expanding the docset ! processing to look for files ending in '.cgi' as well as ! '.py'. - **Bug Fixes** ! - Resolved defect #505456 and 498204, a problem with ! 'happydocwin.py' that prevented it from working properly on ! Win32 systems. ! - Resolved defect #501240 so that path handling under Win32 ! systems works properly and HappyDoc can generate output. ! - Resolved defect #505188 so that using the '-o' option will ! properly send output to stdout. ! - **Other Changes** ! - Added more unit tests for formatters, especially ! 'fileformatterbase.py' and 'formatter_HTMLFile.py'. ! - Updated the StructuredTextNG docstring converter so that if an ! exception is generated during parsing of the ST, we fall back ! to ClassicStructuredText. The two syntaxes appear to be ! incompatible, and this should protect backwards compatibility ! for most users. |
From: Doug H. <dou...@us...> - 2002-02-05 12:24:49
|
Update of /cvsroot/happydoc/HappyDoc In directory usw-pr-cvs1:/tmp/cvs-serv28570 Modified Files: CHANGES.txt Log Message: updated for 2.0.1 release Index: CHANGES.txt =================================================================== RCS file: /cvsroot/happydoc/HappyDoc/CHANGES.txt,v retrieving revision 1.27 retrieving revision 1.28 diff -C2 -d -r1.27 -r1.28 *** CHANGES.txt 2001/12/24 19:09:09 1.27 --- CHANGES.txt 2002/02/05 12:24:45 1.28 *************** *** 1,4 **** --- 1,36 ---- HappyDoc Change History + Version 2.0.1 -- + + - **New Features** + + - Added limited support for CGI programs by expanding the docset + processing to look for files ending in '.cgi' as well as + '.py'. + + - **Bug Fixes** + + - Resolved defect #505456 and 498204, a problem with + 'happydocwin.py' that prevented it from working properly on + Win32 systems. + + - Resolved defect #501240 so that path handling under Win32 + systems works properly and HappyDoc can generate output. + + - Resolved defect #505188 so that using the '-o' option will + properly send output to stdout. + + - **Other Changes** + + - Added more unit tests for formatters, especially + 'fileformatterbase.py' and 'formatter_HTMLFile.py'. + + - Updated the StructuredTextNG docstring converter so that if an + exception is generated during parsing of the ST, we fall back + to ClassicStructuredText. The two syntaxes appear to be + incompatible, and this should protect backwards compatibility + for most users. + + Version 2.0 -- |
From: Doug H. <dou...@us...> - 2002-02-05 01:18:25
|
Update of /cvsroot/happydoc/HappyDoc/happydoclib/parseinfo In directory usw-pr-cvs1:/tmp/cvs-serv15265 Modified Files: __init__.py Log Message: Disable recursive testing because the parser does not pick up all of the things that the imported module shows as being present (especially inherited methods). The test case needs more work. Index: __init__.py =================================================================== RCS file: /cvsroot/happydoc/HappyDoc/happydoclib/parseinfo/__init__.py,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** __init__.py 2001/12/16 12:13:53 1.5 --- __init__.py 2002/02/05 01:18:21 1.6 *************** *** 164,167 **** --- 164,169 ---- # raise + except TypeError, msg: + raise TypeError(msg, source) tup = parser.ast2tuple(ast) *************** *** 251,261 **** # Recurse to look at methods # ! for attr_name in dir(obj): ! self._testComparison('%s.%s' % (full_name, attr_name), ! attr_name, ! obj, ! aClass, ! allowedFailures ! ) elif type(obj) == types.MethodType: --- 253,266 ---- # Recurse to look at methods # ! # Importing results in more names than ! # parsing, so this does not work. ! # ! #for attr_name in dir(obj): ! # self._testComparison('%s.%s' % (full_name, attr_name), ! # attr_name, ! # obj, ! # aClass, ! # allowedFailures ! # ) elif type(obj) == types.MethodType: *************** *** 295,317 **** ['OuterClass', 'OuterFunction', 'TestApp', 'ISTERMINAL', 'ISNONTERMINAL', 'ISEOF', 'main', ]) return ! def testExtractVariablesFromModule(self): ! expected_values = { ! 'TestInt':1, ! 'TestString':"String", ! 'TestStringModule':"this has spaces in front and back", ! 'url': 'b=B&a=A', ! } ! module_values = self.parsed_module.getConfigurationValues() ! if self.verboseLevel.get() > 1: ! print 'Module variables for %s' % self.filename ! import pprint ! pprint.pprint(module_values) ! assert (module_values == expected_values), 'Did not find expected variables' ! return def testExtractVariablesFromModuleWithException(self): --- 300,323 ---- ['OuterClass', 'OuterFunction', 'TestApp', 'ISTERMINAL', 'ISNONTERMINAL', 'ISEOF', 'main', + 'appInit' ]) return ! # def testExtractVariablesFromModule(self): ! # expected_values = { ! # 'TestInt':1, ! # 'TestString':"String", ! # 'TestStringModule':"this has spaces in front and back", ! # 'url': 'b=B&a=A', ! # } ! # module_values = self.parsed_module.getConfigurationValues() ! # if self.verboseLevel.get() > 1: ! # print 'Module variables for %s' % self.filename ! # import pprint ! # pprint.pprint(module_values) ! # assert (module_values == expected_values), 'Did not find expected variables' ! # return def testExtractVariablesFromModuleWithException(self): |
From: Doug H. <dou...@us...> - 2002-02-03 21:50:48
|
Update of /cvsroot/happydoc/HappyDoc/happydoclib/formatter In directory usw-pr-cvs1:/tmp/cvs-serv10496/happydoclib/formatter Modified Files: formatter_DocBookX.py Log Message: Changed reference to formatter_xml so that it uses xmlformatterbase instead. Index: formatter_DocBookX.py =================================================================== RCS file: /cvsroot/happydoc/HappyDoc/happydoclib/formatter/formatter_DocBookX.py,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** formatter_DocBookX.py 2002/01/31 18:38:00 1.3 --- formatter_DocBookX.py 2002/02/03 21:50:45 1.4 *************** *** 86,90 **** """ ! apply(happydoclib.formatter.formatter_xml.XMLFormatter.__init__, \ (self, docset, encoding, index_file_name, file_name_ext), conf) self.file_name_ext='docb' --- 86,90 ---- """ ! apply(happydoclib.formatter.xmlformatterbase.XMLFormatter.__init__, \ (self, docset, encoding, index_file_name, file_name_ext), conf) self.file_name_ext='docb' |
From: Doug H. <dou...@us...> - 2002-02-03 21:50:13
|
Update of /cvsroot/happydoc/HappyDoc/happydoclib/formatter In directory usw-pr-cvs1:/tmp/cvs-serv10325/happydoclib/formatter Modified Files: xmlformatterbase.py Log Message: Changed reference to formatter_file so that it uses fileformatterbase instead. Added extra arguments to writeText to make it consistent with new required arguments. Index: xmlformatterbase.py =================================================================== RCS file: /cvsroot/happydoc/HappyDoc/happydoclib/formatter/xmlformatterbase.py,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** xmlformatterbase.py 2001/10/24 21:27:35 1.1 --- xmlformatterbase.py 2002/02/03 21:50:11 1.2 *************** *** 69,73 **** # initialize the base class ! apply(happydoclib.formatter.formatter_file.FileBasedFormatter.__init__, (self, docset), conf) --- 69,73 ---- # initialize the base class ! apply(happydoclib.formatter.fileformatterbase.FileBasedFormatter.__init__, (self, docset), conf) *************** *** 110,114 **** def tag(self, name, output, attrs={}): ! """This method outputs opening tag with attributes. Method "endTag' should be used to close the tag. --- 110,114 ---- def tag(self, name, output, attrs={}): ! """This method outputs opening tag with attributes. Method 'endTag' should be used to close the tag. *************** *** 205,209 **** ! def writeText(self, text, output): """Outputs text to XML file. --- 205,209 ---- ! def writeText(self, text, output, textFormat, quote=1): """Outputs text to XML file. *************** *** 213,216 **** --- 213,224 ---- 'output' -- output file object + + 'textFormat' -- String identifying the format of 'text' so + the formatter can use a docstring converter to convert the + body of 'text' to the appropriate output format. + + 'quote=1' -- Boolean option to control whether the text + should be quoted to escape special characters. + """ self.writeRaw(self.getIndent()+text+'\n', output) |
From: Doug H. <dou...@us...> - 2002-02-03 21:49:30
|
Update of /cvsroot/happydoc/HappyDoc/happydoclib In directory usw-pr-cvs1:/tmp/cvs-serv10045/happydoclib Modified Files: happyformatter.py Log Message: Fixed documentation for default implementation of writeText() so that all arguments are reflected. Index: happyformatter.py =================================================================== RCS file: /cvsroot/happydoc/HappyDoc/happydoclib/happyformatter.py,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** happyformatter.py 2002/02/02 13:46:04 1.4 --- happyformatter.py 2002/02/03 21:49:27 1.5 *************** *** 222,227 **** return str ! def writeText(self, text, output, quote=1): ! "Write the text to the output destination." text = self._unquoteString(text) self.writeRaw(text, output) --- 222,241 ---- return str ! def writeText(self, text, output, textFormat, quote=1): ! """Write the text to the output destination. ! ! Arguments ! ! 'text' -- text to output ! ! 'output' -- output file object ! ! 'textFormat' -- String identifying the format of 'text' so ! the formatter can use a docstring converter to convert the ! body of 'text' to the appropriate output format. ! ! 'quote=1' -- Boolean option to control whether the text ! should be quoted to escape special characters. ! """ text = self._unquoteString(text) self.writeRaw(text, output) |