[py-svn] r33722 - in py/dist/py/apigen: rest tracer
guido at codespeak.net
guido at codespeak.net
Wed Oct 25 16:07:32 CEST 2006
Author: guido
Date: Wed Oct 25 16:07:30 2006
New Revision: 33722
Modified:
py/dist/py/apigen/rest/genrest.py
py/dist/py/apigen/tracer/docstorage.py
Log:
Renamed 'get_function_doc' (DocStorageAccessor) to 'get_doc' and using it to
get class documentation inside the ReST.
Modified: py/dist/py/apigen/rest/genrest.py
==============================================================================
--- py/dist/py/apigen/rest/genrest.py (original)
+++ py/dist/py/apigen/rest/genrest.py Wed Oct 25 16:07:30 2006
@@ -203,6 +203,7 @@
ret = []
for cls, functions in classes:
rest = [Title('Class: %s' % (cls,), belowchar='-'),
+ LiteralBlock(self.dsa.get_doc(cls)),
Title('Functions:', belowchar='^')]
for func in functions:
linktarget = self.writer.getlink('method',
@@ -282,7 +283,7 @@
# from indentation, or treated as ReST too (although this is obviously
# dangerous for non-ReST docstrings)...
lst = [Title("Function: %s" % (functionname,), belowchar=belowchar),
- LiteralBlock(self.dsa.get_function_doc(functionname)),
+ LiteralBlock(self.dsa.get_doc(functionname)),
LiteralBlock(self.dsa.get_function_definition(functionname))]
lst.append(Paragraph("where:"))
Modified: py/dist/py/apigen/tracer/docstorage.py
==============================================================================
--- py/dist/py/apigen/tracer/docstorage.py (original)
+++ py/dist/py/apigen/tracer/docstorage.py Wed Oct 25 16:07:30 2006
@@ -124,8 +124,8 @@
def get_class_names(self):
""" Returning names of all classess
"""
-
- def get_function_doc(self, name):
+
+ def get_doc(self, name):
""" Returning __doc__ of a function
"""
@@ -174,7 +174,7 @@
#def get_function(self, name):
# return self.ds.descs[name].pyobj
- def get_function_doc(self, name):
+ def get_doc(self, name):
return self.ds.descs[name].pyobj.__doc__ or "*Not documented*"
def get_function_definition(self, name):
More information about the pytest-commit
mailing list