[Epydoc-commits] SF.net SVN: epydoc: [1653] trunk/epydoc/src/epydoc/docstringparser.py
Brought to you by:
edloper
From: <ed...@us...> - 2007-09-26 18:42:11
|
Revision: 1653 http://epydoc.svn.sourceforge.net/epydoc/?rev=1653&view=rev Author: edloper Date: 2007-09-26 11:42:09 -0700 (Wed, 26 Sep 2007) Log Message: ----------- - Fixed bug where @sort warnings were issued for vars like __author__. - Fixed bug where __author__ etc were ignored if the module docstring was empty. Modified Paths: -------------- trunk/epydoc/src/epydoc/docstringparser.py Modified: trunk/epydoc/src/epydoc/docstringparser.py =================================================================== --- trunk/epydoc/src/epydoc/docstringparser.py 2007-09-26 04:45:34 UTC (rev 1652) +++ trunk/epydoc/src/epydoc/docstringparser.py 2007-09-26 18:42:09 UTC (rev 1653) @@ -185,8 +185,12 @@ initialize_api_doc(api_doc) - # If there's no docstring, then there's nothing more to do. + # If there's no docstring, then check for special variables (e.g., + # __version__), and then return -- there's nothing else to do. if (api_doc.docstring in (None, UNKNOWN)): + if isinstance(api_doc, NamespaceDoc): + for field in STANDARD_FIELDS + user_docfields(api_doc, docindex): + add_metadata_from_var(api_doc, field) return # Remove leading indentation from the docstring. @@ -324,6 +328,9 @@ 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 def initialize_api_doc(api_doc): """A helper function for L{parse_docstring()} that initializes This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |