[Epydoc-commits] SF.net SVN: epydoc: [1401] trunk/epydoc/src/epydoc/docwriter/html.py
Brought to you by:
edloper
From: <dva...@us...> - 2006-09-17 17:54:52
|
Revision: 1401 http://svn.sourceforge.net/epydoc/?rev=1401&view=rev Author: dvarrazzo Date: 2006-09-17 10:54:47 -0700 (Sun, 17 Sep 2006) Log Message: ----------- - An empty "Decorators:" fields group is not shown if ``classmethod`` and ``staticmethod`` are the only decorators of a method. Modified Paths: -------------- trunk/epydoc/src/epydoc/docwriter/html.py Modified: trunk/epydoc/src/epydoc/docwriter/html.py =================================================================== --- trunk/epydoc/src/epydoc/docwriter/html.py 2006-09-17 15:04:40 UTC (rev 1400) +++ trunk/epydoc/src/epydoc/docwriter/html.py 2006-09-17 17:54:47 UTC (rev 1401) @@ -2111,11 +2111,21 @@ <dl><dt>Returns: <code>$rtype$</code></dt></dl> >>> #endif >>> # === decorators === - >>> if func_doc.decorators not in (None, UNKNOWN, (), []): + >>> if func_doc.decorators not in (None, UNKNOWN): + >>> # (staticmethod & classmethod are already shown, above) + >>> decos = filter(lambda deco: + >>> not ((deco=="staticmethod" and + >>> isinstance(func_doc, StaticMethodDoc)) or + >>> (deco=="classmethod" and + >>> isinstance(func_doc, ClassMethodDoc))), + >>> func_doc.decorators) + >>> else: + >>> decos = None + >>> #endif + >>> if decos: <dl><dt>Decorators:</dt></dl> <ul class="nomargin"> - >>> for deco in func_doc.decorators: - >>> # (staticmethod & classmethod are already shown, above) + >>> for deco in decos: >>> if not ((deco=="staticmethod" and >>> isinstance(func_doc, StaticMethodDoc)) or >>> (deco=="classmethod" and This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |