[Epydoc-commits] SF.net SVN: epydoc: [1168] trunk/epydoc/src/epydoc
Brought to you by:
edloper
From: <ed...@us...> - 2006-04-05 16:53:00
|
Revision: 1168 Author: edloper Date: 2006-04-05 09:52:56 -0700 (Wed, 05 Apr 2006) ViewCVS: http://svn.sourceforge.net/epydoc/?rev=1168&view=rev Log Message: ----------- - Added RoutineDoc.lineno Modified Paths: -------------- trunk/epydoc/src/epydoc/docintrospecter.py trunk/epydoc/src/epydoc/docparser.py Modified: trunk/epydoc/src/epydoc/docintrospecter.py =================================================================== --- trunk/epydoc/src/epydoc/docintrospecter.py 2006-04-05 16:52:41 UTC (rev 1167) +++ trunk/epydoc/src/epydoc/docintrospecter.py 2006-04-05 16:52:56 UTC (rev 1168) @@ -443,6 +443,10 @@ routine_doc.posargs = routine_doc.posargs[1:] routine_doc.posarg_defaults = routine_doc.posarg_defaults[1:] + # Set the routine's line number. + if hasattr(func, 'func_code'): + routine_doc.lineno = func.func_code.co_firstlineno + else: # [XX] I should probably use UNKNOWN here?? routine_doc.posargs = ['...'] Modified: trunk/epydoc/src/epydoc/docparser.py =================================================================== --- trunk/epydoc/src/epydoc/docparser.py 2006-04-05 16:52:41 UTC (rev 1167) +++ trunk/epydoc/src/epydoc/docparser.py 2006-04-05 16:52:56 UTC (rev 1168) @@ -1360,7 +1360,7 @@ # Create the function's RoutineDoc. func_doc = RoutineDoc(canonical_name=canonical_name, defining_module=parent_docs[0], - docs_extracted_by='parser') + lineno=lineno, docs_extracted_by='parser') # Process the signature. init_arglist(func_doc, line[2]) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |