[Epydoc-commits] SF.net SVN: epydoc: [1592] trunk/epydoc/src/epydoc/docparser.py
Brought to you by:
edloper
From: <dva...@us...> - 2007-07-10 23:16:32
|
Revision: 1592 http://svn.sourceforge.net/epydoc/?rev=1592&view=rev Author: dvarrazzo Date: 2007-07-10 16:16:30 -0700 (Tue, 10 Jul 2007) Log Message: ----------- - Checking that the `NamespaceDoc.sort_spec` is populated. This is not the case when assigning an attribute to a namespace which has never been parsed. See SF bug #1693253. Modified Paths: -------------- trunk/epydoc/src/epydoc/docparser.py Modified: trunk/epydoc/src/epydoc/docparser.py =================================================================== --- trunk/epydoc/src/epydoc/docparser.py 2007-07-10 22:01:12 UTC (rev 1591) +++ trunk/epydoc/src/epydoc/docparser.py 2007-07-10 23:16:30 UTC (rev 1592) @@ -1839,6 +1839,12 @@ # Choose which dictionary we'll be storing the variable in. if not isinstance(namespace, NamespaceDoc): return + + # This happens when the class definition has not been parsed, e.g. in + # sf bug #1693253 on ``Exception.x = y`` + if namespace.sort_spec is UNKNOWN: + namespace.sort_spec = namespace.variables.keys() + # If we already have a variable with this name, then remove the # old VariableDoc from the sort_spec list; and if we gave its # value a canonical name, then delete it. This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |