From 9dbcd04fa76daf31a476277b1126650496061ae5 Mon Sep 17 00:00:00 2001 From: Robin Dunn Date: Thu, 29 Sep 2011 20:55:57 +0000 Subject: [PATCH] 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 --- etgtools/sip_generator.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/etgtools/sip_generator.py b/etgtools/sip_generator.py index 5bb8d84b..98784c92 100644 --- a/etgtools/sip_generator.py +++ b/etgtools/sip_generator.py @@ -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)