[Epydoc-commits] SF.net SVN: epydoc: [1281] trunk/epydoc/src/epydoc
Brought to you by:
edloper
From: <ed...@us...> - 2006-08-22 00:53:11
|
Revision: 1281 Author: edloper Date: 2006-08-21 17:53:05 -0700 (Mon, 21 Aug 2006) ViewCVS: http://svn.sourceforge.net/epydoc/?rev=1281&view=rev Log Message: ----------- - Applied patches from SF bug [ 1482145 ] "Cannot introspect or parse Schevo project code". These all basically have to do with handling the case when a RoutineDoc's posargs, varargs, or kwargs attributes are UNKNOWN. Modified Paths: -------------- trunk/epydoc/src/epydoc/apidoc.py trunk/epydoc/src/epydoc/docparser.py trunk/epydoc/src/epydoc/docwriter/html.py Modified: trunk/epydoc/src/epydoc/apidoc.py =================================================================== --- trunk/epydoc/src/epydoc/apidoc.py 2006-08-21 14:13:15 UTC (rev 1280) +++ trunk/epydoc/src/epydoc/apidoc.py 2006-08-22 00:53:05 UTC (rev 1281) @@ -1347,6 +1347,9 @@ consists of a tuple of names, then that tuple will be flattened. """ + if self.posargs is UNKNOWN: + return UNKNOWN + all_args = _flatten(self.posargs) if self.vararg not in (None, UNKNOWN): all_args.append(self.vararg) @@ -1603,9 +1606,10 @@ return None # Is it a parameter's name or an attribute of a parameter? - if (isinstance(context, RoutineDoc) and - name[0] in context.all_args()): - return None + if isinstance(context, RoutineDoc): + all_args = context.all_args() + if all_args is not UNKNOWN and name[0] in all_args: + return None #//////////////////////////////////////////////////////////// # etc Modified: trunk/epydoc/src/epydoc/docparser.py =================================================================== --- trunk/epydoc/src/epydoc/docparser.py 2006-08-21 14:13:15 UTC (rev 1280) +++ trunk/epydoc/src/epydoc/docparser.py 2006-08-22 00:53:05 UTC (rev 1281) @@ -1151,6 +1151,7 @@ # the name of the first arg to the containing routinedoc, and # <name> is a simple name. posargs = parent_docs[-1].posargs + if posargs is UNKNOWN: return False if not (len(lhs_pieces)==1 and len(posargs) > 0 and len(lhs_pieces[0]) == 3 and lhs_pieces[0][0] == (token.NAME, posargs[0]) and Modified: trunk/epydoc/src/epydoc/docwriter/html.py =================================================================== --- trunk/epydoc/src/epydoc/docwriter/html.py 2006-08-21 14:13:15 UTC (rev 1280) +++ trunk/epydoc/src/epydoc/docwriter/html.py 2006-08-22 00:53:05 UTC (rev 1281) @@ -2424,13 +2424,13 @@ else: args = [self.func_arg(n, d, css_class) for (n, d) in zip(func_doc.posargs, func_doc.posarg_defaults)] - if func_doc.vararg: + if func_doc.vararg not in (None, UNKNOWN): if func_doc.vararg == '...': args.append('<span class="%s-arg">...</span>' % css_class) else: args.append('<span class="%s-arg">*%s</span>' % (css_class, func_doc.vararg)) - if func_doc.kwarg: + if func_doc.kwarg not in (None, UNKNOWN): args.append('<span class="%s-arg">**%s</span>' % (css_class, func_doc.kwarg)) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |