Commit Graph

24 Commits

Author SHA1 Message Date
John McFarland f8ed9d71a7 Fix doxygen translation of \p command for python
Doxygen writes this using typewriter font, so wrap in `` for python
2019-09-15 10:59:03 -05:00
John McFarland 3476565665 Remove extra newline before code block in doxygen python output
Remove a newline character that was added to the translated comments
prior to the code block.  This way the structure of the pydoc output
more closely resembles that of the original doxygen comments.
Updating tests accordingly.
2019-05-27 13:06:32 -05:00
John McFarland c52bed2e66 Eliminate extra newlines in doxygen python \verbatim blocks
Eliminate extra leading and trailing newlines present in translated
doxygen \verbatim comments for python.  Updating doxygen python tests
accordingly.
2019-05-25 16:25:54 -05:00
John McFarland 321cb096a8 Remove extra newline from end of doxygen python \code command
Remove the extra newline at the end of translation of doxygen \code
\endcode command for Python.  Update test output accordingly.
2019-05-25 16:25:54 -05:00
John McFarland e62c88883f Fix python doxygen indentation for inline \code command
If \code was used inline, it produced an extra indent versus block
usage.  This extra indent was also stored in the test output.  This
update resolves this by simply removing a space that was being added
unnecessarily in handleTagVerbatim.  Updating test case output
accordingly.
2019-05-25 16:11:20 -05:00
William S Fulton 8234656497 Correct python example headers 2018-05-25 23:35:28 +01:00
William S Fulton 95caf87596 PEP8 conformance for comment verifier module 2018-05-25 07:56:45 +01:00
Vadim Zeitlin 148bcab7a0 Switch Python Doxygen unit tests to use inspect.getdoc()
Using the standard inspect module instead of accessing __doc__ directly allows
the tests to pass both when using and not using -builtin, as whitespace-only
differences between the docstrings don't matter then because inspect.getdoc()
removes the indentation and the leading and trailing spaces.

This is similar to what had been already done for python_docstring unit test
in fa282b3540.
2016-12-12 01:26:05 +01:00
Vadim Zeitlin 410b508e9a 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.
2014-12-15 13:59:17 +01:00
Vadim Zeitlin 6aa9cd37a5 Document the return type when translating Doxygen @return to Python.
In addition to translating the comment itself, also document the type of the
object returned. This is consistent with generating not only :param: but also
:type: for the parameters documented using @param.
2014-08-22 17:45:24 +02:00
Vadim Zeitlin d678891e43 Translate Doxygen code blocks to Sphinx code blocks.
This ensures they are formatted correctly and syntax highlighted (currently
always as C++ code).
2014-08-22 17:45:23 +02:00
Vadim Zeitlin 8b83976f4c Fix arguments of @param, @return etc translations to Python.
For the parameter documentation to be really taken as such, in its entirety,
by Sphinx, it must be indented relative to the :param: tag. Do this by
appending an extra indent after every line of the output and work around the
unnecessary indent of the last line by removing the trailing whitespace.

This required updating the existing tests and removing the expected but not
present any more whitespace from them, but as trailing whitespace in the
documentation is at best insignificant (and at worst harmful) anyhow, this is
not a big price to pay for simpler translator code.
2014-08-22 17:45:22 +02:00
Vadim Zeitlin 7d2743a0bb Use reST inline markup in PyDocConverter instead of Markdown.
reST is standard Python markup, so use *...*, ``...`` and so on instead of
_..._, '...' etc.

No other changes even though the mapping of some Doxygen tags to markup used
for them seems suspicions (e.g. \var almost certainly should be the same as
\em).
2014-08-13 16:11:30 +02:00
Vadim Zeitlin b374aad0da Use Sphinx-compatible docstring format in PyDocConverter.
Use the more or less standard :param:, :type:, :return: and :raises: in the
function/methods descriptions.

Update the output expected from the Python tests accordingly.
2014-08-13 16:11:30 +02:00
Vadim Zeitlin 6cce652762 Merge latest master into doxygen branch again.
Update Doxygen-specific Python unit tests to work with the new indentation.

Update one of Doxygen-specific Java tests to still build with the new handling
of srcdir.
2014-08-13 16:11:21 +02:00
Marko Klopcic 3b7908fa6e fixed leading spaces for the second row of table in pydoc, sources formatted 2013-02-23 15:20:27 +01:00
Marko Klopcic b5dea7456b improved handling of word commands if puntuation is following the word, preserved spaces at start of comment line 2013-02-21 09:05:11 +01:00
Marko Klopcic 9b52972c24 HTML tags and entities tests pass for Python 2013-02-14 21:53:09 +01:00
Marko Klopcic 0b6bc80038 Translation of HTML tags to Python almost finished 2013-02-13 23:06:20 +01:00
Marko Klopcic 560dedb6c0 added handling of HTML tags and HTML entities to PyDocConverter, updated tests 2013-02-12 22:58:50 +01:00
Marko Klopcic 77b6099c05 updated two additional python doxygen tests 2013-02-07 08:46:38 +01:00
Marko Klopcic 29d1bba70a improved comment formatting for Python 2013-02-02 23:01:09 +01:00
Dmitry Kabak 316be573f8 Fixed lots of PyDoc converter problems, see doxygen_tricky_constructs test
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/branches/gsoc2012-doxygen@13633 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2012-08-16 14:18:47 +00:00
Dmitry Kabak 8a683e42d0 Fixed and updated all doxygen python tests
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/branches/gsoc2012-doxygen@13346 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2012-07-23 13:50:27 +00:00