Use %DefaultDocstringFormat and write the %Docstrings indented inside the classes as expected to make the generated .sip files easier for mere humans to read and understand.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxPython/Phoenix/trunk@69234 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Robin Dunn
2011-09-29 20:55:57 +00:00
parent 820a61dc4c
commit 9dbcd04fa7

View File

@@ -69,6 +69,8 @@ class SipWrapperGenerator(generators.WrapperGeneratorBase):
License: wxWindows License
%%End
%%DefaultDocstringFormat(name="deindented")
""" % (module.package, module.name))
if module.name.startswith('_'):
@@ -422,8 +424,8 @@ from %s import *
text = '\n\n' + text
text = '\n'.join(sigs) + text
# write the directive and the text
if True:
# write the docstring directive and the text
if False:
# SIP is preserving all leading whitespace in the docstring, so
# write this without indents. :-(
stream.write('%%Docstring\n%s\n%%End\n' % text)