[Epydoc-commits] SF.net SVN: epydoc: [1426] trunk/epydoc/src/epydoc
Brought to you by:
edloper
|
From: <dva...@us...> - 2007-01-29 00:14:39
|
Revision: 1426
http://svn.sourceforge.net/epydoc/?rev=1426&view=rev
Author: dvarrazzo
Date: 2007-01-28 16:14:38 -0800 (Sun, 28 Jan 2007)
Log Message:
-----------
- Warning about unknown parameters suppressed if the function couldn't
be introspected, e.g. for builtins. Fixes SF bug #1556024.
Modified Paths:
--------------
trunk/epydoc/src/epydoc/docintrospecter.py
trunk/epydoc/src/epydoc/docstringparser.py
Modified: trunk/epydoc/src/epydoc/docintrospecter.py
===================================================================
--- trunk/epydoc/src/epydoc/docintrospecter.py 2007-01-28 20:58:50 UTC (rev 1425)
+++ trunk/epydoc/src/epydoc/docintrospecter.py 2007-01-29 00:14:38 UTC (rev 1426)
@@ -435,6 +435,9 @@
else:
# [XX] I should probably use UNKNOWN here??
+ # dvarrazzo: if '...' is to be changed, also check that
+ # `docstringparser.process_arg_field()` works correctly.
+ # See SF bug #1556024.
routine_doc.posargs = ['...']
routine_doc.posarg_defaults = [None]
routine_doc.kwarg = None
Modified: trunk/epydoc/src/epydoc/docstringparser.py
===================================================================
--- trunk/epydoc/src/epydoc/docstringparser.py 2007-01-28 20:58:50 UTC (rev 1425)
+++ trunk/epydoc/src/epydoc/docstringparser.py 2007-01-29 00:14:38 UTC (rev 1426)
@@ -700,9 +700,11 @@
api_doc.arg_descrs.append( (idents, descr) )
# Check to make sure that the documented parameter(s) are
# actually part of the function signature.
- bad_params = ['"%s"' % i for i in idents if i not in api_doc.all_args()]
- if bad_params:
- raise ValueError(BAD_PARAM % (tag, ', '.join(bad_params)))
+ all_args = api_doc.all_args()
+ if all_args not in (['...'], UNKNOWN):
+ bad_params = ['"%s"' % i for i in idents if i not in all_args]
+ if bad_params:
+ raise ValueError(BAD_PARAM % (tag, ', '.join(bad_params)))
def process_kwarg_field(api_doc, docindex, tag, arg, descr):
# [xx] these should -not- be checked if they exist..
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|