Don't indent Doxygen doc strings in generated Python code.
This is unnecessary and inconsistent with "builtin" case in which the docstrings are not indented in the generated C++ code, thus making it impossible to write tests working in both cases. Most of the changes in this commit simply remove the extra whitespace from the expected values in the tests.
This commit is contained in:
parent
9b857e6cf1
commit
410b508e9a
9 changed files with 471 additions and 535 deletions
|
|
@ -8,49 +8,46 @@ import commentVerifier
|
|||
|
||||
commentVerifier.check(doxygen_misc_constructs.getAddress.__doc__,
|
||||
r"""
|
||||
Returns address of file line.
|
||||
Returns address of file line.
|
||||
|
||||
:type fileName: int
|
||||
:param fileName: name of the file, where the source line is located
|
||||
:type line: int
|
||||
:param line: line number
|
||||
:type isGetSize: boolean
|
||||
:param isGetSize: if set, for every object location both address and size are returned
|
||||
:type fileName: int
|
||||
:param fileName: name of the file, where the source line is located
|
||||
:type line: int
|
||||
:param line: line number
|
||||
:type isGetSize: boolean
|
||||
:param isGetSize: if set, for every object location both address and size are returned
|
||||
|
||||
Connection::getId()
|
||||
|
||||
""")
|
||||
Connection::getId()
|
||||
""")
|
||||
|
||||
commentVerifier.check(doxygen_misc_constructs.CConnectionConfig.__doc__,
|
||||
r"""
|
||||
This class contains information for connection to winIDEA. Its methods
|
||||
return reference to self, so we can use it like this:
|
||||
This class contains information for connection to winIDEA. Its methods
|
||||
return reference to self, so we can use it like this:
|
||||
|
||||
CConnectionConfig config = new CConnectionConfig();
|
||||
config.discoveryPort(5534).dllPath("C:\\myWinIDEA\\connect.dll").id("main");
|
||||
CConnectionConfig config = new CConnectionConfig();
|
||||
config.discoveryPort(5534).dllPath("C:\\myWinIDEA\\connect.dll").id("main");
|
||||
|
||||
|
||||
All parameters are optional. Set only what is required, default values are
|
||||
used for unspecified parameters.
|
||||
All parameters are optional. Set only what is required, default values are
|
||||
used for unspecified parameters.
|
||||
|
||||
|
||||
|
||||
advancedWinIDEALaunching.py Python example.
|
||||
|
||||
""")
|
||||
advancedWinIDEALaunching.py Python example.
|
||||
""")
|
||||
|
||||
commentVerifier.check(doxygen_misc_constructs.waitTime.__doc__,
|
||||
r"""
|
||||
Determines how long the ``isystem.connect`` should wait for running
|
||||
instances to respond. Only one of ``lfWaitXXX`` flags from IConnect::ELaunchFlags
|
||||
may be specified.
|
||||
"""
|
||||
Determines how long the ``isystem.connect`` should wait for running
|
||||
instances to respond. Only one of ``lfWaitXXX`` flags from IConnect::ELaunchFlags
|
||||
may be specified."""
|
||||
)
|
||||
|
||||
commentVerifier.check(doxygen_misc_constructs.getConnection.__doc__,
|
||||
r"""
|
||||
This function returns connection id.
|
||||
"""
|
||||
r"""
|
||||
|
||||
This function returns connection id."""
|
||||
)
|
||||
|
||||
|
||||
|
|
@ -60,37 +57,31 @@ commentVerifier.check(doxygen_misc_constructs.getFirstLetter.__doc__,
|
|||
|
||||
commentVerifier.check(doxygen_misc_constructs.ClassWithNestedEnum.__doc__,
|
||||
r"""
|
||||
Class description.
|
||||
"""
|
||||
Class description."""
|
||||
)
|
||||
|
||||
commentVerifier.check(doxygen_misc_constructs.showList.__doc__,
|
||||
r"""
|
||||
An example of a list in a documentation comment.
|
||||
An example of a list in a documentation comment.
|
||||
|
||||
- The first item of the list.
|
||||
- The second list item, on
|
||||
several indented lines,
|
||||
showing that the indentation
|
||||
is preserved.
|
||||
- And the final list item after it.
|
||||
- The first item of the list.
|
||||
- The second list item, on
|
||||
several indented lines,
|
||||
showing that the indentation
|
||||
is preserved.
|
||||
- And the final list item after it.
|
||||
|
||||
And this is not a list item any more.
|
||||
"""
|
||||
And this is not a list item any more."""
|
||||
)
|
||||
|
||||
commentVerifier.check(doxygen_misc_constructs.isNoSpaceValidA.__doc__,
|
||||
r"""
|
||||
This comment without space after '*' is valid in Doxygen.
|
||||
|
||||
"""
|
||||
r"""This comment without space after '*' is valid in Doxygen.
|
||||
"""
|
||||
)
|
||||
|
||||
commentVerifier.check(doxygen_misc_constructs.isNoSpaceValidB.__doc__,
|
||||
r"""
|
||||
.This comment without space after '*' is valid in Doxygen.
|
||||
|
||||
"""
|
||||
r""".This comment without space after '*' is valid in Doxygen.
|
||||
"""
|
||||
)
|
||||
|
||||
commentVerifier.check(doxygen_misc_constructs.isNoSpaceValidC.__doc__,
|
||||
|
|
@ -99,64 +90,60 @@ commentVerifier.check(doxygen_misc_constructs.isNoSpaceValidC.__doc__,
|
|||
|
||||
commentVerifier.check(doxygen_misc_constructs.backslashA.__doc__,
|
||||
r"""
|
||||
Backslash following``word`` is a valid doxygen command. Output contains
|
||||
'followingword' with 'word' in code font.
|
||||
"""
|
||||
Backslash following``word`` is a valid doxygen command. Output contains
|
||||
'followingword' with 'word' in code font."""
|
||||
)
|
||||
|
||||
commentVerifier.check(doxygen_misc_constructs.backslashB.__doc__,
|
||||
r"""
|
||||
Doxy command without trailing space is ignored - nothing appears
|
||||
on output. Standalone \ and '\' get to output.
|
||||
Standalone @ and '@' get to output.
|
||||
Commands "in quoted \b strings are treated as plain text".
|
||||
Commands not recognized by Doxygen are ignored.
|
||||
Backslashes in DOS paths d:and words
|
||||
following them do not appear on output, we must quote them with
|
||||
double quotes: "d:\xyz\qwe\myfile", "@something". Single quotes do not help:
|
||||
'd:'. Escaping works: d:\xyz\qwe\myfile. Unix
|
||||
paths of course have no such problems: /xyz/qwe/myfile
|
||||
Commands for escaped symbols:
|
||||
$ @ \ & ~ < > # % " . :: @text ::text
|
||||
"""
|
||||
Doxy command without trailing space is ignored - nothing appears
|
||||
on output. Standalone \ and '\' get to output.
|
||||
Standalone @ and '@' get to output.
|
||||
Commands "in quoted \b strings are treated as plain text".
|
||||
Commands not recognized by Doxygen are ignored.
|
||||
Backslashes in DOS paths d:and words
|
||||
following them do not appear on output, we must quote them with
|
||||
double quotes: "d:\xyz\qwe\myfile", "@something". Single quotes do not help:
|
||||
'd:'. Escaping works: d:\xyz\qwe\myfile. Unix
|
||||
paths of course have no such problems: /xyz/qwe/myfile
|
||||
Commands for escaped symbols:
|
||||
$ @ \ & ~ < > # % " . :: @text ::text"""
|
||||
)
|
||||
|
||||
commentVerifier.check(doxygen_misc_constructs.backslashC.__doc__,
|
||||
r"""
|
||||
Backslash e at end of *line* froze SWIG
|
||||
*with* old comment parser.
|
||||
Backslash e at end of *line* froze SWIG
|
||||
*with* old comment parser.
|
||||
|
||||
See also: MyClass::fun(char,
|
||||
float)
|
||||
"""
|
||||
See also: MyClass::fun(char,
|
||||
float)"""
|
||||
)
|
||||
|
||||
|
||||
commentVerifier.check(doxygen_misc_constructs.cycle.__doc__,
|
||||
r"""
|
||||
The next line contains expression:
|
||||
The next line contains expression:
|
||||
|
||||
['retVal < 10', 'g_counter == 23 && g_mode & 3']
|
||||
['retVal < 10', 'g_counter == 23 && g_mode & 3']
|
||||
|
||||
|
||||
Both words should be emphasized **isystem.connect**.
|
||||
But not the last period. For **example**, comma should not be emphasized.
|
||||
Similar **for**: double colon.
|
||||
Both words should be emphasized **isystem.connect**.
|
||||
But not the last period. For **example**, comma should not be emphasized.
|
||||
Similar **for**: double colon.
|
||||
|
||||
Spaces at the start of line should be taken into account:
|
||||
:type id: int
|
||||
:param id: used as prefix in log
|
||||
statements. The default value is empty string, which is OK if
|
||||
there is only one app. instance. Example:
|
||||
Spaces at the start of line should be taken into account:
|
||||
:type id: int
|
||||
:param id: used as prefix in log
|
||||
statements. The default value is empty string, which is OK if
|
||||
there is only one app. instance. Example:
|
||||
|
||||
ctrl.setBP("func1");
|
||||
ctrl.setBP("func1");
|
||||
|
||||
If we set the id to ``main_``, we get:
|
||||
If we set the id to ``main_``, we get:
|
||||
|
||||
main_ctrl.setBP("func1");
|
||||
main_ctrl.setBP("func1");
|
||||
|
||||
|
||||
:type fileName: string
|
||||
:param fileName: name of the log file
|
||||
"""
|
||||
:type fileName: string
|
||||
:param fileName: name of the log file"""
|
||||
);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue