[Epydoc-commits] SF.net SVN: epydoc: [1282] trunk/epydoc/src/epydoc/docstringparser.py
Brought to you by:
edloper
From: <ed...@us...> - 2006-08-22 01:14:36
|
Revision: 1282 Author: edloper Date: 2006-08-21 18:14:31 -0700 (Mon, 21 Aug 2006) ViewCVS: http://svn.sourceforge.net/epydoc/?rev=1282&view=rev Log Message: ----------- Fixed SF bug [ 1496737 ] Submodules cannot be @undocumented. Modified Paths: -------------- trunk/epydoc/src/epydoc/docstringparser.py Modified: trunk/epydoc/src/epydoc/docstringparser.py =================================================================== --- trunk/epydoc/src/epydoc/docstringparser.py 2006-08-22 00:53:05 UTC (rev 1281) +++ trunk/epydoc/src/epydoc/docstringparser.py 2006-08-22 01:14:31 UTC (rev 1282) @@ -441,6 +441,22 @@ if var_name_re.match(var_name): # Remove the variable from `variables`. api_doc.variables.pop(var_name, None) + # For modules, remove any submodules that match var_name_re. + if isinstance(api_doc, ModuleDoc): + removed = set([m for m in api_doc.submodules + if var_name_re.match(m.canonical_name[-1])]) + if removed: + # Remove the indicated submodules from this module. + api_doc.submodules = [m for m in api_doc.submodules + if m not in removed] + # Remove all ancestors of the indicated submodules + # from the docindex root. E.g., if module x + # declares y to be undocumented, then x.y.z should + # also be undocumented. + for elt in docindex.root[:]: + for m in removed: + if m.canonical_name.dominates(elt.canonical_name): + docindex.root.remove(elt) def process_group_field(api_doc, docindex, tag, arg, descr): """Define a group named C{arg} containing the variables whose This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |