docstring fixes

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxPython/Phoenix/trunk@69972 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Robin Dunn
2011-12-10 04:36:51 +00:00
parent db885e8ab0
commit 06a7072ddf
3 changed files with 14 additions and 14 deletions

View File

@@ -104,9 +104,9 @@ def run():
c.addCppMethod('PyObject*', 'Get', '()', """\
return sipBuildResult(0, "(ii)", self->x, self->y);
""", briefDoc="""\
Get() -> (x,y)\n
Return the x and y properties as a tuple.""")
""",
pyArgsString="Get() -> (x,y)",
briefDoc="Return the x and y properties as a tuple.")
# Add sequence protocol methods and other goodies
c.addPyMethod('__str__', '(self)', 'return str(self.Get())')
@@ -162,9 +162,9 @@ def run():
c.addCppMethod('PyObject*', 'Get', '()', """\
return sipBuildResult(0, "(ii)", self->GetWidth(), self->GetHeight());
""", briefDoc="""\
Get() -> (width, height)\n
Return the width and height properties as a tuple.""")
""",
pyArgsString="Get() -> (width, height)",
briefDoc="Return the width and height properties as a tuple.")
# Add sequence protocol methods and other goodies
c.addPyMethod('__str__', '(self)', 'return str(self.Get())')
@@ -235,9 +235,9 @@ def run():
c.addCppMethod('PyObject*', 'Get', '()', """\
return sipBuildResult(0, "(iiii)",
self->x, self->y, self->width, self->height);
""", briefDoc="""\
Get() -> (x, y, width, height)\n
Return the rectangle's properties as a tuple.""")
""",
pyArgsString="Get() -> (x, y, width, height)",
briefDoc="Return the rectangle's properties as a tuple.")
# Add sequence protocol methods and other goodies
c.addPyMethod('__str__', '(self)', 'return str(self.Get())')
@@ -283,9 +283,9 @@ def run():
c.addCppMethod('PyObject*', 'Get', '()', """\
return sipBuildResult(0, "(dd)", self->x, self->y);
""", briefDoc="""\
Get() -> (x, y, width, height)\n
Return the rectangle's properties as a tuple.""")
""",
pyArgsString="Get() -> (x, y)",
briefDoc="Return the point's properties as a tuple.")
# Add sequence protocol methods and other goodies
c.addPyMethod('__str__', '(self)', 'return str(self.Get())')

View File

@@ -98,7 +98,7 @@ def run():
node.name = name
node.templateParams = []
node.bases = [base]
node.briefDoc = etgtools.flattenNode(node.briefDoc)
node.briefDoc = etgtools.flattenNode(node.briefDoc, False)
node.briefDoc = node.briefDoc.replace('wxScrolled', name)
node.briefDoc += doc
for ctor in node.find('wxScrolled').all():

View File

@@ -430,7 +430,7 @@ from %s import *
def generateDocstring(self, item, stream, indent):
# get the docstring text
text = nci(extractors.flattenNode(item.briefDoc))
text = nci(extractors.flattenNode(item.briefDoc, False))
if isinstance(item, extractors.ClassDef):
# append the function signatures for the class constructors (if any) to the class' docstring