Commit Graph

11 Commits

Author SHA1 Message Date
Irina Fediaeva
c381659535 PY-27049: Decrease heading size in quick documentation
GitOrigin-RevId: 5fdb58c9905b20f1e33dfd9534016b5c91e4e3c7
2023-02-01 17:30:33 +00:00
Irina.Fediaeva
9754124962 PY-34667: Markup support in documentation sections
GitOrigin-RevId: 4dadd51fcbb89111e7df27e7babd158c6f64da75
2022-11-15 16:38:32 +00:00
Irina.Fediaeva
6306571043 PY-26281: Make empty line after summary in docstring optional
GitOrigin-RevId: 35914ea4676e716fca8a82eff7e8bde4f427d8ff
2022-10-07 12:36:53 +00:00
Mikhail Golubev
d0819698dd In docstring_formatter.py substitute the standard streams only when it's launched as a script
Otherwise, it might break importing the module in tests, because unit test
libraries often replace the standard streams with proxies having no "fileno"
attribute.

GitOrigin-RevId: 2ce07c4d84703674ddbe00d0a8048d267fd058c7
2022-09-22 14:01:43 +00:00
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