[Epydoc-commits] SF.net SVN: epydoc: [1648] trunk/epydoc/src/epydoc/docbuilder.py
Brought to you by:
edloper
|
From: <ed...@us...> - 2007-09-25 22:08:03
|
Revision: 1648
http://epydoc.svn.sourceforge.net/epydoc/?rev=1648&view=rev
Author: edloper
Date: 2007-09-25 15:08:01 -0700 (Tue, 25 Sep 2007)
Log Message:
-----------
- Fixed potential bug, related to sf bug 1682525, which could cause
some apidocs to never recieve any canonical name, under certain
conditions that involved vars shadowing modules.
Modified Paths:
--------------
trunk/epydoc/src/epydoc/docbuilder.py
Modified: trunk/epydoc/src/epydoc/docbuilder.py
===================================================================
--- trunk/epydoc/src/epydoc/docbuilder.py 2007-09-25 22:06:15 UTC (rev 1647)
+++ trunk/epydoc/src/epydoc/docbuilder.py 2007-09-25 22:08:01 UTC (rev 1648)
@@ -1131,8 +1131,10 @@
or isinstance(var_doc.value, GenericValueDoc)):
continue
- # This check is for cases like curses.wrapper, where an
- # imported variable shadows its value's "real" location.
+ # [XX] After svn commit 1644-1647, I'm not sure if this
+ # ever gets used: This check is for cases like
+ # curses.wrapper, where an imported variable shadows its
+ # value's "real" location.
if _var_shadows_self(var_doc, varname):
_fix_self_shadowing_var(var_doc, varname, docindex)
@@ -1169,10 +1171,10 @@
var_doc.value = val_doc
return
- # If we couldn't find the actual value, then at least
- # invalidate the canonical name.
- log.warning('%s shadows itself' % varname)
- del var_doc.value.canonical_name
+ # If we couldn't find the actual value, use an unreachable name.
+ name = _unreachable_name_for(var_doc.value, docindex)
+ log.warning('%s shadows itself -- using %s instead' % (varname, name))
+ var_doc.value.canonical_name = name
def _unreachable_name_for(val_doc, docindex):
assert isinstance(val_doc, ValueDoc)
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|