[Epydoc-commits] SF.net SVN: epydoc: [1668] trunk/epydoc/src/epydoc/docstringparser.py
Brought to you by:
edloper
From: <ed...@us...> - 2008-01-29 01:54:58
|
Revision: 1668 http://epydoc.svn.sourceforge.net/epydoc/?rev=1668&view=rev Author: edloper Date: 2008-01-28 17:54:56 -0800 (Mon, 28 Jan 2008) Log Message: ----------- Fixed sourceforge bug #1825472 -- metadata fields (such as __authors__) with multiple values were causing epydoc to die, because the code to remove it was inside a loop that got repeated once for each value: the second time through the loop, it had already been removed. Modified Paths: -------------- trunk/epydoc/src/epydoc/docstringparser.py Modified: trunk/epydoc/src/epydoc/docstringparser.py =================================================================== --- trunk/epydoc/src/epydoc/docstringparser.py 2008-01-29 01:47:51 UTC (rev 1667) +++ trunk/epydoc/src/epydoc/docstringparser.py 2008-01-29 01:54:56 UTC (rev 1668) @@ -326,12 +326,14 @@ # Add in the metadata and remove from the variables api_doc.metadata.append( (field, varname, elt) ) - if var_doc.docstring in (None, UNKNOWN): - del api_doc.variables[varname] - if api_doc.sort_spec is not UNKNOWN: - try: api_doc.sort_spec.remove(varname) - except ValueError: pass + # Remove the variable itself (unless it's documented) + if var_doc.docstring in (None, UNKNOWN): + del api_doc.variables[varname] + if api_doc.sort_spec is not UNKNOWN: + try: api_doc.sort_spec.remove(varname) + except ValueError: pass + def initialize_api_doc(api_doc): """A helper function for L{parse_docstring()} that initializes the attributes that C{parse_docstring()} will write to.""" This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |