[Epydoc-commits] SF.net SVN: epydoc: [1673] trunk/epydoc/src/epydoc/docparser.py
Brought to you by:
edloper
From: <ed...@us...> - 2008-01-29 05:43:00
|
Revision: 1673 http://epydoc.svn.sourceforge.net/epydoc/?rev=1673&view=rev Author: edloper Date: 2008-01-28 21:42:58 -0800 (Mon, 28 Jan 2008) Log Message: ----------- - Applied sourceforge patch #1723597 -- convert imported names to global names before adding them to ModuleDoc.imports. Modified Paths: -------------- trunk/epydoc/src/epydoc/docparser.py Modified: trunk/epydoc/src/epydoc/docparser.py =================================================================== --- trunk/epydoc/src/epydoc/docparser.py 2008-01-29 03:53:51 UTC (rev 1672) +++ trunk/epydoc/src/epydoc/docparser.py 2008-01-29 05:42:58 UTC (rev 1673) @@ -902,14 +902,15 @@ list of exports is found by importing and introspecting C{M{<src>}}. """ - # Record the import - parent_docs[0].imports.append(src) # mark that it's .*?? - + # This is redundant: already checked by caller. if not isinstance(parent_docs[-1], NamespaceDoc): return # If src is package-local, then convert it to a global name. src = _global_name(src, parent_docs) + # Record the import + parent_docs[0].imports.append(src) # mark that it's .*?? + # [xx] add check for if we already have the source docs in our # cache?? @@ -956,15 +957,16 @@ we need to create a variable C{'a'} in parentdoc containing a proxy module; and a variable C{'b'} in the proxy module. """ - # Record the import - parent_docs[0].imports.append(name) - + # This is redundant: already checked by caller. if not isinstance(parent_docs[-1], NamespaceDoc): return # If name is package-local, then convert it to a global name. src = _global_name(name, parent_docs) src_prefix = src[:len(src)-len(name)] + # Record the import + parent_docs[0].imports.append(name) + # [xx] add check for if we already have the source docs in our # cache?? @@ -1012,14 +1014,15 @@ Otherwise, create a variables with its C{imported_from} attribute pointing to the imported object. """ - # Record the import - parent_docs[0].imports.append(src) - + # This is redundant: already checked by caller. if not isinstance(parent_docs[-1], NamespaceDoc): return # If src is package-local, then convert it to a global name. src = _global_name(src, parent_docs) + # Record the import + parent_docs[0].imports.append(src) + if IMPORT_HANDLING == 'parse': # Parse the value and create a variable for it. try: val_doc = _find(src) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |