Open thatlittleboy opened 1 year ago
I debugged it a little, I think the main issue is here (?)
So I think the problem is two-fold:
python-legacy
is not passing docstring_style
(and docstring_options
) to pytkdocs
, which is why it is parsing google by default.pytkdocs
is still expecting "restructured-text" (not "sphinx"); We could either do a mapping in python-legacy
internals so that if users pass in "sphinx" in the options, we pass "restructured-text" to pytkdocs, or we make pytkdocs PARSERS
accept sphinx.Hello, thanks for the detailed report!
Sorry, the docs are definitely wrong, they should say restructured-text
and not sphinx
in the legacy handler.
I'll check your theory, it's possible that the option is not correctly passed to pytkdocs indeed.
Describe the bug
As per title. I specify
sphinx
as adocstring_style
option but the handler is rendering as per Google instead of Sphinx. (Ignoring my option specification).To Reproduce
Steps to reproduce the behavior:
Following usage instructions here: https://mkdocstrings.github.io/python-legacy/usage/#usage
pip install mkdocs mkdocs-material mkdocstrings mkdocstrings-python-legacy
. See my pip freeze output at the bottom.Noting that the documentation mentioned the "accepted
docstring_style
are:google, numpy, sphinx, or None. Default: "google"
". Createmkdocs.yml
:Python functions for testing
mkdocs serve
.sphinx
in the options. I tried changingsphinx
->restructured-text
inmkdocs.yml
and same problem.Expected behavior
Param table for
sphinx
style to be rendered normally.Screenshots
Note that the docs itself is also rendered wrongly, it seems. https://mkdocstrings.github.io/python-legacy/usage/#annotations_1
System (please complete the following information):
mkdocstrings-python (legacy)
version: 0.2.3Additional context Add any other context about the problem here.
pip freeze