Commit Graph

7 Commits

Author SHA1 Message Date
Mikhail Golubev
e0d8445c69 PY-29717 Display description for parameters and return values in sections
docstring_formatter.py is no longer responsible for rendering this table
2018-06-09 15:59:39 +03:00
Mikhail Golubev
1c2b7071fa PY-25885 Remove registered sphinxcontrib modules in docstring_formatter.py
Otherwise their presense doesn't let us import sphinxcontrib.napoleon
that we need to render docstrings in Numpy/Google Style formats.

It's not enough to remove site-packages/dist-packages from sys.path to
isolate the script from such "malicious" packages, since they are
registered and installed in sys.modules on interpreter startup before
any path modifications happen.

Launching interpreter with -S option prevents it from running these
hooks and also excludes site-packages from sys.path but makes inherited
stdlib modules not available in virtualenv.

What's more, sphinxcontrib.napoleon itself depends on setuptools as it
tries to register itself in a similar fashion in its __init__.py.
We could patch it but that would make future updates of the library
more tedious and error-prone.
2017-08-31 14:33:32 +03:00
Mikhail Golubev
5de4b6af06 PY-23255 Support both ":return:" and ":returns:" tags in ReST 2017-03-24 18:46:49 +03:00
Mikhail Golubev
54a4b415d1 PY-23254 Cleanup: more descriptive names for local variables 2017-03-24 18:46:49 +03:00
Mikhail Golubev
3bafaad36b PY-23254 Render standalone :type and :rtype tags as if there were :param and :return 2017-03-24 18:46:49 +03:00
Mikhail Golubev
c219d5e3e6 PY-22253 Fix rendering of ":rtype:" if there is no type after it 2017-03-24 18:46:49 +03:00
Mikhail Golubev
a5b43e5978 Rename rest_formatter.py to docstring_formatter.py
I intentionally extracted it to a separate commit, since, otherwise,
git it not able to track that the helper script was renamed
(due to a lot changes in it) and preserve its previous history.
2016-08-11 18:04:52 +03:00