[Zope3-checkins] CVS: Zope3/src/zope/interface - document.py:1.4
Jim Fulton
jim@zope.com
Mon, 14 Apr 2003 04:31:00 -0400
Update of /cvs-repository/Zope3/src/zope/interface
In directory cvs.zope.org:/tmp/cvs-serv6702
Modified Files:
document.py
Log Message:
Changed the structured text generation to omit Interface from the
list of extended interfaces, since this isn't interesting. This is
actually tested in the accessor tests in zope.schema. A local test
would be nice, as would support for reStructuredText.
=== Zope3/src/zope/interface/document.py 1.3 => 1.4 ===
--- Zope3/src/zope/interface/document.py:1.3 Thu Mar 13 13:49:14 2003
+++ Zope3/src/zope/interface/document.py Mon Apr 14 04:31:00 2003
@@ -20,6 +20,7 @@
$Id$
"""
+import zope.interface
from string import maketrans
def asStructuredText(I, munge=0):
@@ -34,10 +35,14 @@
if I.getDoc():
outp(_justify_and_indent(_trim_doc_string(I.getDoc()), level)+ "\n\n")
- if I.getBases():
+ bases = [base
+ for base in I.getBases()
+ if base is not zope.interface.Interface
+ ]
+ if bases:
outp((" " * level) + "This interface extends:\n\n")
level = level + 1
- for b in I.getBases():
+ for b in bases:
item = "o %s" % b.getName()
outp(_justify_and_indent(_trim_doc_string(item), level, munge)
+ "\n\n")