mkdocstrings-python 1.10.3__tar.gz → 1.10.4__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {mkdocstrings_python-1.10.3 → mkdocstrings_python-1.10.4}/PKG-INFO +5 -4
- {mkdocstrings_python-1.10.3 → mkdocstrings_python-1.10.4}/README.md +2 -2
- {mkdocstrings_python-1.10.3 → mkdocstrings_python-1.10.4}/pyproject.toml +11 -2
- {mkdocstrings_python-1.10.3 → mkdocstrings_python-1.10.4}/src/mkdocstrings_handlers/python/debug.py +4 -1
- {mkdocstrings_python-1.10.3 → mkdocstrings_python-1.10.4}/src/mkdocstrings_handlers/python/handler.py +4 -4
- {mkdocstrings_python-1.10.3 → mkdocstrings_python-1.10.4}/src/mkdocstrings_handlers/python/templates/material/_base/children.html.jinja +5 -5
- mkdocstrings_python-1.10.3/tests/__init__.py +0 -7
- mkdocstrings_python-1.10.3/tests/conftest.py +0 -96
- mkdocstrings_python-1.10.3/tests/test_handler.py +0 -175
- mkdocstrings_python-1.10.3/tests/test_rendering.py +0 -167
- mkdocstrings_python-1.10.3/tests/test_themes.py +0 -46
- {mkdocstrings_python-1.10.3 → mkdocstrings_python-1.10.4}/LICENSE +0 -0
- {mkdocstrings_python-1.10.3 → mkdocstrings_python-1.10.4}/src/mkdocstrings_handlers/python/__init__.py +0 -0
- {mkdocstrings_python-1.10.3 → mkdocstrings_python-1.10.4}/src/mkdocstrings_handlers/python/py.typed +0 -0
- {mkdocstrings_python-1.10.3 → mkdocstrings_python-1.10.4}/src/mkdocstrings_handlers/python/rendering.py +0 -0
- {mkdocstrings_python-1.10.3 → mkdocstrings_python-1.10.4}/src/mkdocstrings_handlers/python/templates/material/_base/attribute.html +0 -0
- {mkdocstrings_python-1.10.3 → mkdocstrings_python-1.10.4}/src/mkdocstrings_handlers/python/templates/material/_base/attribute.html.jinja +0 -0
- {mkdocstrings_python-1.10.3 → mkdocstrings_python-1.10.4}/src/mkdocstrings_handlers/python/templates/material/_base/children.html +0 -0
- {mkdocstrings_python-1.10.3 → mkdocstrings_python-1.10.4}/src/mkdocstrings_handlers/python/templates/material/_base/class.html +0 -0
- {mkdocstrings_python-1.10.3 → mkdocstrings_python-1.10.4}/src/mkdocstrings_handlers/python/templates/material/_base/class.html.jinja +0 -0
- {mkdocstrings_python-1.10.3 → mkdocstrings_python-1.10.4}/src/mkdocstrings_handlers/python/templates/material/_base/docstring/admonition.html +0 -0
- {mkdocstrings_python-1.10.3 → mkdocstrings_python-1.10.4}/src/mkdocstrings_handlers/python/templates/material/_base/docstring/admonition.html.jinja +0 -0
- {mkdocstrings_python-1.10.3 → mkdocstrings_python-1.10.4}/src/mkdocstrings_handlers/python/templates/material/_base/docstring/attributes.html +0 -0
- {mkdocstrings_python-1.10.3 → mkdocstrings_python-1.10.4}/src/mkdocstrings_handlers/python/templates/material/_base/docstring/attributes.html.jinja +0 -0
- {mkdocstrings_python-1.10.3 → mkdocstrings_python-1.10.4}/src/mkdocstrings_handlers/python/templates/material/_base/docstring/classes.html +0 -0
- {mkdocstrings_python-1.10.3 → mkdocstrings_python-1.10.4}/src/mkdocstrings_handlers/python/templates/material/_base/docstring/classes.html.jinja +0 -0
- {mkdocstrings_python-1.10.3 → mkdocstrings_python-1.10.4}/src/mkdocstrings_handlers/python/templates/material/_base/docstring/examples.html +0 -0
- {mkdocstrings_python-1.10.3 → mkdocstrings_python-1.10.4}/src/mkdocstrings_handlers/python/templates/material/_base/docstring/examples.html.jinja +0 -0
- {mkdocstrings_python-1.10.3 → mkdocstrings_python-1.10.4}/src/mkdocstrings_handlers/python/templates/material/_base/docstring/functions.html +0 -0
- {mkdocstrings_python-1.10.3 → mkdocstrings_python-1.10.4}/src/mkdocstrings_handlers/python/templates/material/_base/docstring/functions.html.jinja +0 -0
- {mkdocstrings_python-1.10.3 → mkdocstrings_python-1.10.4}/src/mkdocstrings_handlers/python/templates/material/_base/docstring/modules.html +0 -0
- {mkdocstrings_python-1.10.3 → mkdocstrings_python-1.10.4}/src/mkdocstrings_handlers/python/templates/material/_base/docstring/modules.html.jinja +0 -0
- {mkdocstrings_python-1.10.3 → mkdocstrings_python-1.10.4}/src/mkdocstrings_handlers/python/templates/material/_base/docstring/other_parameters.html +0 -0
- {mkdocstrings_python-1.10.3 → mkdocstrings_python-1.10.4}/src/mkdocstrings_handlers/python/templates/material/_base/docstring/other_parameters.html.jinja +0 -0
- {mkdocstrings_python-1.10.3 → mkdocstrings_python-1.10.4}/src/mkdocstrings_handlers/python/templates/material/_base/docstring/parameters.html +0 -0
- {mkdocstrings_python-1.10.3 → mkdocstrings_python-1.10.4}/src/mkdocstrings_handlers/python/templates/material/_base/docstring/parameters.html.jinja +0 -0
- {mkdocstrings_python-1.10.3 → mkdocstrings_python-1.10.4}/src/mkdocstrings_handlers/python/templates/material/_base/docstring/raises.html +0 -0
- {mkdocstrings_python-1.10.3 → mkdocstrings_python-1.10.4}/src/mkdocstrings_handlers/python/templates/material/_base/docstring/raises.html.jinja +0 -0
- {mkdocstrings_python-1.10.3 → mkdocstrings_python-1.10.4}/src/mkdocstrings_handlers/python/templates/material/_base/docstring/receives.html +0 -0
- {mkdocstrings_python-1.10.3 → mkdocstrings_python-1.10.4}/src/mkdocstrings_handlers/python/templates/material/_base/docstring/receives.html.jinja +0 -0
- {mkdocstrings_python-1.10.3 → mkdocstrings_python-1.10.4}/src/mkdocstrings_handlers/python/templates/material/_base/docstring/returns.html +0 -0
- {mkdocstrings_python-1.10.3 → mkdocstrings_python-1.10.4}/src/mkdocstrings_handlers/python/templates/material/_base/docstring/returns.html.jinja +0 -0
- {mkdocstrings_python-1.10.3 → mkdocstrings_python-1.10.4}/src/mkdocstrings_handlers/python/templates/material/_base/docstring/warns.html +0 -0
- {mkdocstrings_python-1.10.3 → mkdocstrings_python-1.10.4}/src/mkdocstrings_handlers/python/templates/material/_base/docstring/warns.html.jinja +0 -0
- {mkdocstrings_python-1.10.3 → mkdocstrings_python-1.10.4}/src/mkdocstrings_handlers/python/templates/material/_base/docstring/yields.html +0 -0
- {mkdocstrings_python-1.10.3 → mkdocstrings_python-1.10.4}/src/mkdocstrings_handlers/python/templates/material/_base/docstring/yields.html.jinja +0 -0
- {mkdocstrings_python-1.10.3 → mkdocstrings_python-1.10.4}/src/mkdocstrings_handlers/python/templates/material/_base/docstring.html +0 -0
- {mkdocstrings_python-1.10.3 → mkdocstrings_python-1.10.4}/src/mkdocstrings_handlers/python/templates/material/_base/docstring.html.jinja +0 -0
- {mkdocstrings_python-1.10.3 → mkdocstrings_python-1.10.4}/src/mkdocstrings_handlers/python/templates/material/_base/expression.html +0 -0
- {mkdocstrings_python-1.10.3 → mkdocstrings_python-1.10.4}/src/mkdocstrings_handlers/python/templates/material/_base/expression.html.jinja +0 -0
- {mkdocstrings_python-1.10.3 → mkdocstrings_python-1.10.4}/src/mkdocstrings_handlers/python/templates/material/_base/function.html +0 -0
- {mkdocstrings_python-1.10.3 → mkdocstrings_python-1.10.4}/src/mkdocstrings_handlers/python/templates/material/_base/function.html.jinja +0 -0
- {mkdocstrings_python-1.10.3 → mkdocstrings_python-1.10.4}/src/mkdocstrings_handlers/python/templates/material/_base/labels.html +0 -0
- {mkdocstrings_python-1.10.3 → mkdocstrings_python-1.10.4}/src/mkdocstrings_handlers/python/templates/material/_base/labels.html.jinja +0 -0
- {mkdocstrings_python-1.10.3 → mkdocstrings_python-1.10.4}/src/mkdocstrings_handlers/python/templates/material/_base/language.html +0 -0
- {mkdocstrings_python-1.10.3 → mkdocstrings_python-1.10.4}/src/mkdocstrings_handlers/python/templates/material/_base/language.html.jinja +0 -0
- {mkdocstrings_python-1.10.3 → mkdocstrings_python-1.10.4}/src/mkdocstrings_handlers/python/templates/material/_base/languages/en.html +0 -0
- {mkdocstrings_python-1.10.3 → mkdocstrings_python-1.10.4}/src/mkdocstrings_handlers/python/templates/material/_base/languages/en.html.jinja +0 -0
- {mkdocstrings_python-1.10.3 → mkdocstrings_python-1.10.4}/src/mkdocstrings_handlers/python/templates/material/_base/languages/ja.html +0 -0
- {mkdocstrings_python-1.10.3 → mkdocstrings_python-1.10.4}/src/mkdocstrings_handlers/python/templates/material/_base/languages/ja.html.jinja +0 -0
- {mkdocstrings_python-1.10.3 → mkdocstrings_python-1.10.4}/src/mkdocstrings_handlers/python/templates/material/_base/languages/zh.html +0 -0
- {mkdocstrings_python-1.10.3 → mkdocstrings_python-1.10.4}/src/mkdocstrings_handlers/python/templates/material/_base/languages/zh.html.jinja +0 -0
- {mkdocstrings_python-1.10.3 → mkdocstrings_python-1.10.4}/src/mkdocstrings_handlers/python/templates/material/_base/module.html +0 -0
- {mkdocstrings_python-1.10.3 → mkdocstrings_python-1.10.4}/src/mkdocstrings_handlers/python/templates/material/_base/module.html.jinja +0 -0
- {mkdocstrings_python-1.10.3 → mkdocstrings_python-1.10.4}/src/mkdocstrings_handlers/python/templates/material/_base/signature.html +0 -0
- {mkdocstrings_python-1.10.3 → mkdocstrings_python-1.10.4}/src/mkdocstrings_handlers/python/templates/material/_base/signature.html.jinja +0 -0
- {mkdocstrings_python-1.10.3 → mkdocstrings_python-1.10.4}/src/mkdocstrings_handlers/python/templates/material/_base/summary/attributes.html +0 -0
- {mkdocstrings_python-1.10.3 → mkdocstrings_python-1.10.4}/src/mkdocstrings_handlers/python/templates/material/_base/summary/attributes.html.jinja +0 -0
- {mkdocstrings_python-1.10.3 → mkdocstrings_python-1.10.4}/src/mkdocstrings_handlers/python/templates/material/_base/summary/classes.html +0 -0
- {mkdocstrings_python-1.10.3 → mkdocstrings_python-1.10.4}/src/mkdocstrings_handlers/python/templates/material/_base/summary/classes.html.jinja +0 -0
- {mkdocstrings_python-1.10.3 → mkdocstrings_python-1.10.4}/src/mkdocstrings_handlers/python/templates/material/_base/summary/functions.html +0 -0
- {mkdocstrings_python-1.10.3 → mkdocstrings_python-1.10.4}/src/mkdocstrings_handlers/python/templates/material/_base/summary/functions.html.jinja +0 -0
- {mkdocstrings_python-1.10.3 → mkdocstrings_python-1.10.4}/src/mkdocstrings_handlers/python/templates/material/_base/summary/modules.html +0 -0
- {mkdocstrings_python-1.10.3 → mkdocstrings_python-1.10.4}/src/mkdocstrings_handlers/python/templates/material/_base/summary/modules.html.jinja +0 -0
- {mkdocstrings_python-1.10.3 → mkdocstrings_python-1.10.4}/src/mkdocstrings_handlers/python/templates/material/_base/summary.html +0 -0
- {mkdocstrings_python-1.10.3 → mkdocstrings_python-1.10.4}/src/mkdocstrings_handlers/python/templates/material/_base/summary.html.jinja +0 -0
- {mkdocstrings_python-1.10.3 → mkdocstrings_python-1.10.4}/src/mkdocstrings_handlers/python/templates/material/attribute.html +0 -0
- {mkdocstrings_python-1.10.3 → mkdocstrings_python-1.10.4}/src/mkdocstrings_handlers/python/templates/material/attribute.html.jinja +0 -0
- {mkdocstrings_python-1.10.3 → mkdocstrings_python-1.10.4}/src/mkdocstrings_handlers/python/templates/material/children.html +0 -0
- {mkdocstrings_python-1.10.3 → mkdocstrings_python-1.10.4}/src/mkdocstrings_handlers/python/templates/material/children.html.jinja +0 -0
- {mkdocstrings_python-1.10.3 → mkdocstrings_python-1.10.4}/src/mkdocstrings_handlers/python/templates/material/class.html +0 -0
- {mkdocstrings_python-1.10.3 → mkdocstrings_python-1.10.4}/src/mkdocstrings_handlers/python/templates/material/class.html.jinja +0 -0
- {mkdocstrings_python-1.10.3 → mkdocstrings_python-1.10.4}/src/mkdocstrings_handlers/python/templates/material/docstring/admonition.html +0 -0
- {mkdocstrings_python-1.10.3 → mkdocstrings_python-1.10.4}/src/mkdocstrings_handlers/python/templates/material/docstring/admonition.html.jinja +0 -0
- {mkdocstrings_python-1.10.3 → mkdocstrings_python-1.10.4}/src/mkdocstrings_handlers/python/templates/material/docstring/attributes.html +0 -0
- {mkdocstrings_python-1.10.3 → mkdocstrings_python-1.10.4}/src/mkdocstrings_handlers/python/templates/material/docstring/attributes.html.jinja +0 -0
- {mkdocstrings_python-1.10.3 → mkdocstrings_python-1.10.4}/src/mkdocstrings_handlers/python/templates/material/docstring/classes.html +0 -0
- {mkdocstrings_python-1.10.3 → mkdocstrings_python-1.10.4}/src/mkdocstrings_handlers/python/templates/material/docstring/classes.html.jinja +0 -0
- {mkdocstrings_python-1.10.3 → mkdocstrings_python-1.10.4}/src/mkdocstrings_handlers/python/templates/material/docstring/examples.html +0 -0
- {mkdocstrings_python-1.10.3 → mkdocstrings_python-1.10.4}/src/mkdocstrings_handlers/python/templates/material/docstring/examples.html.jinja +0 -0
- {mkdocstrings_python-1.10.3 → mkdocstrings_python-1.10.4}/src/mkdocstrings_handlers/python/templates/material/docstring/functions.html +0 -0
- {mkdocstrings_python-1.10.3 → mkdocstrings_python-1.10.4}/src/mkdocstrings_handlers/python/templates/material/docstring/functions.html.jinja +0 -0
- {mkdocstrings_python-1.10.3 → mkdocstrings_python-1.10.4}/src/mkdocstrings_handlers/python/templates/material/docstring/modules.html +0 -0
- {mkdocstrings_python-1.10.3 → mkdocstrings_python-1.10.4}/src/mkdocstrings_handlers/python/templates/material/docstring/modules.html.jinja +0 -0
- {mkdocstrings_python-1.10.3 → mkdocstrings_python-1.10.4}/src/mkdocstrings_handlers/python/templates/material/docstring/other_parameters.html +0 -0
- {mkdocstrings_python-1.10.3 → mkdocstrings_python-1.10.4}/src/mkdocstrings_handlers/python/templates/material/docstring/other_parameters.html.jinja +0 -0
- {mkdocstrings_python-1.10.3 → mkdocstrings_python-1.10.4}/src/mkdocstrings_handlers/python/templates/material/docstring/parameters.html +0 -0
- {mkdocstrings_python-1.10.3 → mkdocstrings_python-1.10.4}/src/mkdocstrings_handlers/python/templates/material/docstring/parameters.html.jinja +0 -0
- {mkdocstrings_python-1.10.3 → mkdocstrings_python-1.10.4}/src/mkdocstrings_handlers/python/templates/material/docstring/raises.html +0 -0
- {mkdocstrings_python-1.10.3 → mkdocstrings_python-1.10.4}/src/mkdocstrings_handlers/python/templates/material/docstring/raises.html.jinja +0 -0
- {mkdocstrings_python-1.10.3 → mkdocstrings_python-1.10.4}/src/mkdocstrings_handlers/python/templates/material/docstring/receives.html +0 -0
- {mkdocstrings_python-1.10.3 → mkdocstrings_python-1.10.4}/src/mkdocstrings_handlers/python/templates/material/docstring/receives.html.jinja +0 -0
- {mkdocstrings_python-1.10.3 → mkdocstrings_python-1.10.4}/src/mkdocstrings_handlers/python/templates/material/docstring/returns.html +0 -0
- {mkdocstrings_python-1.10.3 → mkdocstrings_python-1.10.4}/src/mkdocstrings_handlers/python/templates/material/docstring/returns.html.jinja +0 -0
- {mkdocstrings_python-1.10.3 → mkdocstrings_python-1.10.4}/src/mkdocstrings_handlers/python/templates/material/docstring/warns.html +0 -0
- {mkdocstrings_python-1.10.3 → mkdocstrings_python-1.10.4}/src/mkdocstrings_handlers/python/templates/material/docstring/warns.html.jinja +0 -0
- {mkdocstrings_python-1.10.3 → mkdocstrings_python-1.10.4}/src/mkdocstrings_handlers/python/templates/material/docstring/yields.html +0 -0
- {mkdocstrings_python-1.10.3 → mkdocstrings_python-1.10.4}/src/mkdocstrings_handlers/python/templates/material/docstring/yields.html.jinja +0 -0
- {mkdocstrings_python-1.10.3 → mkdocstrings_python-1.10.4}/src/mkdocstrings_handlers/python/templates/material/docstring.html +0 -0
- {mkdocstrings_python-1.10.3 → mkdocstrings_python-1.10.4}/src/mkdocstrings_handlers/python/templates/material/docstring.html.jinja +0 -0
- {mkdocstrings_python-1.10.3 → mkdocstrings_python-1.10.4}/src/mkdocstrings_handlers/python/templates/material/expression.html +0 -0
- {mkdocstrings_python-1.10.3 → mkdocstrings_python-1.10.4}/src/mkdocstrings_handlers/python/templates/material/expression.html.jinja +0 -0
- {mkdocstrings_python-1.10.3 → mkdocstrings_python-1.10.4}/src/mkdocstrings_handlers/python/templates/material/function.html +0 -0
- {mkdocstrings_python-1.10.3 → mkdocstrings_python-1.10.4}/src/mkdocstrings_handlers/python/templates/material/function.html.jinja +0 -0
- {mkdocstrings_python-1.10.3 → mkdocstrings_python-1.10.4}/src/mkdocstrings_handlers/python/templates/material/labels.html +0 -0
- {mkdocstrings_python-1.10.3 → mkdocstrings_python-1.10.4}/src/mkdocstrings_handlers/python/templates/material/labels.html.jinja +0 -0
- {mkdocstrings_python-1.10.3 → mkdocstrings_python-1.10.4}/src/mkdocstrings_handlers/python/templates/material/language.html +0 -0
- {mkdocstrings_python-1.10.3 → mkdocstrings_python-1.10.4}/src/mkdocstrings_handlers/python/templates/material/language.html.jinja +0 -0
- {mkdocstrings_python-1.10.3 → mkdocstrings_python-1.10.4}/src/mkdocstrings_handlers/python/templates/material/languages/en.html +0 -0
- {mkdocstrings_python-1.10.3 → mkdocstrings_python-1.10.4}/src/mkdocstrings_handlers/python/templates/material/languages/en.html.jinja +0 -0
- {mkdocstrings_python-1.10.3 → mkdocstrings_python-1.10.4}/src/mkdocstrings_handlers/python/templates/material/languages/ja.html +0 -0
- {mkdocstrings_python-1.10.3 → mkdocstrings_python-1.10.4}/src/mkdocstrings_handlers/python/templates/material/languages/ja.html.jinja +0 -0
- {mkdocstrings_python-1.10.3 → mkdocstrings_python-1.10.4}/src/mkdocstrings_handlers/python/templates/material/languages/zh.html +0 -0
- {mkdocstrings_python-1.10.3 → mkdocstrings_python-1.10.4}/src/mkdocstrings_handlers/python/templates/material/languages/zh.html.jinja +0 -0
- {mkdocstrings_python-1.10.3 → mkdocstrings_python-1.10.4}/src/mkdocstrings_handlers/python/templates/material/module.html +0 -0
- {mkdocstrings_python-1.10.3 → mkdocstrings_python-1.10.4}/src/mkdocstrings_handlers/python/templates/material/module.html.jinja +0 -0
- {mkdocstrings_python-1.10.3 → mkdocstrings_python-1.10.4}/src/mkdocstrings_handlers/python/templates/material/signature.html +0 -0
- {mkdocstrings_python-1.10.3 → mkdocstrings_python-1.10.4}/src/mkdocstrings_handlers/python/templates/material/signature.html.jinja +0 -0
- {mkdocstrings_python-1.10.3 → mkdocstrings_python-1.10.4}/src/mkdocstrings_handlers/python/templates/material/style.css +0 -0
- {mkdocstrings_python-1.10.3 → mkdocstrings_python-1.10.4}/src/mkdocstrings_handlers/python/templates/material/summary/attributes.html +0 -0
- {mkdocstrings_python-1.10.3 → mkdocstrings_python-1.10.4}/src/mkdocstrings_handlers/python/templates/material/summary/attributes.html.jinja +0 -0
- {mkdocstrings_python-1.10.3 → mkdocstrings_python-1.10.4}/src/mkdocstrings_handlers/python/templates/material/summary/classes.html +0 -0
- {mkdocstrings_python-1.10.3 → mkdocstrings_python-1.10.4}/src/mkdocstrings_handlers/python/templates/material/summary/classes.html.jinja +0 -0
- {mkdocstrings_python-1.10.3 → mkdocstrings_python-1.10.4}/src/mkdocstrings_handlers/python/templates/material/summary/functions.html +0 -0
- {mkdocstrings_python-1.10.3 → mkdocstrings_python-1.10.4}/src/mkdocstrings_handlers/python/templates/material/summary/functions.html.jinja +0 -0
- {mkdocstrings_python-1.10.3 → mkdocstrings_python-1.10.4}/src/mkdocstrings_handlers/python/templates/material/summary/modules.html +0 -0
- {mkdocstrings_python-1.10.3 → mkdocstrings_python-1.10.4}/src/mkdocstrings_handlers/python/templates/material/summary/modules.html.jinja +0 -0
- {mkdocstrings_python-1.10.3 → mkdocstrings_python-1.10.4}/src/mkdocstrings_handlers/python/templates/material/summary.html +0 -0
- {mkdocstrings_python-1.10.3 → mkdocstrings_python-1.10.4}/src/mkdocstrings_handlers/python/templates/material/summary.html.jinja +0 -0
- {mkdocstrings_python-1.10.3 → mkdocstrings_python-1.10.4}/src/mkdocstrings_handlers/python/templates/readthedocs/_base/docstring/attributes.html +0 -0
- {mkdocstrings_python-1.10.3 → mkdocstrings_python-1.10.4}/src/mkdocstrings_handlers/python/templates/readthedocs/_base/docstring/attributes.html.jinja +0 -0
- {mkdocstrings_python-1.10.3 → mkdocstrings_python-1.10.4}/src/mkdocstrings_handlers/python/templates/readthedocs/_base/docstring/other_parameters.html +0 -0
- {mkdocstrings_python-1.10.3 → mkdocstrings_python-1.10.4}/src/mkdocstrings_handlers/python/templates/readthedocs/_base/docstring/other_parameters.html.jinja +0 -0
- {mkdocstrings_python-1.10.3 → mkdocstrings_python-1.10.4}/src/mkdocstrings_handlers/python/templates/readthedocs/_base/docstring/parameters.html +0 -0
- {mkdocstrings_python-1.10.3 → mkdocstrings_python-1.10.4}/src/mkdocstrings_handlers/python/templates/readthedocs/_base/docstring/parameters.html.jinja +0 -0
- {mkdocstrings_python-1.10.3 → mkdocstrings_python-1.10.4}/src/mkdocstrings_handlers/python/templates/readthedocs/_base/docstring/raises.html +0 -0
- {mkdocstrings_python-1.10.3 → mkdocstrings_python-1.10.4}/src/mkdocstrings_handlers/python/templates/readthedocs/_base/docstring/raises.html.jinja +0 -0
- {mkdocstrings_python-1.10.3 → mkdocstrings_python-1.10.4}/src/mkdocstrings_handlers/python/templates/readthedocs/_base/docstring/receives.html +0 -0
- {mkdocstrings_python-1.10.3 → mkdocstrings_python-1.10.4}/src/mkdocstrings_handlers/python/templates/readthedocs/_base/docstring/receives.html.jinja +0 -0
- {mkdocstrings_python-1.10.3 → mkdocstrings_python-1.10.4}/src/mkdocstrings_handlers/python/templates/readthedocs/_base/docstring/returns.html +0 -0
- {mkdocstrings_python-1.10.3 → mkdocstrings_python-1.10.4}/src/mkdocstrings_handlers/python/templates/readthedocs/_base/docstring/returns.html.jinja +0 -0
- {mkdocstrings_python-1.10.3 → mkdocstrings_python-1.10.4}/src/mkdocstrings_handlers/python/templates/readthedocs/_base/docstring/warns.html +0 -0
- {mkdocstrings_python-1.10.3 → mkdocstrings_python-1.10.4}/src/mkdocstrings_handlers/python/templates/readthedocs/_base/docstring/warns.html.jinja +0 -0
- {mkdocstrings_python-1.10.3 → mkdocstrings_python-1.10.4}/src/mkdocstrings_handlers/python/templates/readthedocs/_base/docstring/yields.html +0 -0
- {mkdocstrings_python-1.10.3 → mkdocstrings_python-1.10.4}/src/mkdocstrings_handlers/python/templates/readthedocs/_base/docstring/yields.html.jinja +0 -0
- {mkdocstrings_python-1.10.3 → mkdocstrings_python-1.10.4}/src/mkdocstrings_handlers/python/templates/readthedocs/_base/language.html +0 -0
- {mkdocstrings_python-1.10.3 → mkdocstrings_python-1.10.4}/src/mkdocstrings_handlers/python/templates/readthedocs/_base/language.html.jinja +0 -0
- {mkdocstrings_python-1.10.3 → mkdocstrings_python-1.10.4}/src/mkdocstrings_handlers/python/templates/readthedocs/_base/languages/en.html +0 -0
- {mkdocstrings_python-1.10.3 → mkdocstrings_python-1.10.4}/src/mkdocstrings_handlers/python/templates/readthedocs/_base/languages/en.html.jinja +0 -0
- {mkdocstrings_python-1.10.3 → mkdocstrings_python-1.10.4}/src/mkdocstrings_handlers/python/templates/readthedocs/_base/languages/ja.html +0 -0
- {mkdocstrings_python-1.10.3 → mkdocstrings_python-1.10.4}/src/mkdocstrings_handlers/python/templates/readthedocs/_base/languages/ja.html.jinja +0 -0
- {mkdocstrings_python-1.10.3 → mkdocstrings_python-1.10.4}/src/mkdocstrings_handlers/python/templates/readthedocs/_base/languages/zh.html +0 -0
- {mkdocstrings_python-1.10.3 → mkdocstrings_python-1.10.4}/src/mkdocstrings_handlers/python/templates/readthedocs/_base/languages/zh.html.jinja +0 -0
- {mkdocstrings_python-1.10.3 → mkdocstrings_python-1.10.4}/src/mkdocstrings_handlers/python/templates/readthedocs/docstring/attributes.html +0 -0
- {mkdocstrings_python-1.10.3 → mkdocstrings_python-1.10.4}/src/mkdocstrings_handlers/python/templates/readthedocs/docstring/attributes.html.jinja +0 -0
- {mkdocstrings_python-1.10.3 → mkdocstrings_python-1.10.4}/src/mkdocstrings_handlers/python/templates/readthedocs/docstring/other_parameters.html +0 -0
- {mkdocstrings_python-1.10.3 → mkdocstrings_python-1.10.4}/src/mkdocstrings_handlers/python/templates/readthedocs/docstring/other_parameters.html.jinja +0 -0
- {mkdocstrings_python-1.10.3 → mkdocstrings_python-1.10.4}/src/mkdocstrings_handlers/python/templates/readthedocs/docstring/parameters.html +0 -0
- {mkdocstrings_python-1.10.3 → mkdocstrings_python-1.10.4}/src/mkdocstrings_handlers/python/templates/readthedocs/docstring/parameters.html.jinja +0 -0
- {mkdocstrings_python-1.10.3 → mkdocstrings_python-1.10.4}/src/mkdocstrings_handlers/python/templates/readthedocs/docstring/raises.html +0 -0
- {mkdocstrings_python-1.10.3 → mkdocstrings_python-1.10.4}/src/mkdocstrings_handlers/python/templates/readthedocs/docstring/raises.html.jinja +0 -0
- {mkdocstrings_python-1.10.3 → mkdocstrings_python-1.10.4}/src/mkdocstrings_handlers/python/templates/readthedocs/docstring/receives.html +0 -0
- {mkdocstrings_python-1.10.3 → mkdocstrings_python-1.10.4}/src/mkdocstrings_handlers/python/templates/readthedocs/docstring/receives.html.jinja +0 -0
- {mkdocstrings_python-1.10.3 → mkdocstrings_python-1.10.4}/src/mkdocstrings_handlers/python/templates/readthedocs/docstring/returns.html +0 -0
- {mkdocstrings_python-1.10.3 → mkdocstrings_python-1.10.4}/src/mkdocstrings_handlers/python/templates/readthedocs/docstring/returns.html.jinja +0 -0
- {mkdocstrings_python-1.10.3 → mkdocstrings_python-1.10.4}/src/mkdocstrings_handlers/python/templates/readthedocs/docstring/warns.html +0 -0
- {mkdocstrings_python-1.10.3 → mkdocstrings_python-1.10.4}/src/mkdocstrings_handlers/python/templates/readthedocs/docstring/warns.html.jinja +0 -0
- {mkdocstrings_python-1.10.3 → mkdocstrings_python-1.10.4}/src/mkdocstrings_handlers/python/templates/readthedocs/docstring/yields.html +0 -0
- {mkdocstrings_python-1.10.3 → mkdocstrings_python-1.10.4}/src/mkdocstrings_handlers/python/templates/readthedocs/docstring/yields.html.jinja +0 -0
- {mkdocstrings_python-1.10.3 → mkdocstrings_python-1.10.4}/src/mkdocstrings_handlers/python/templates/readthedocs/language.html +0 -0
- {mkdocstrings_python-1.10.3 → mkdocstrings_python-1.10.4}/src/mkdocstrings_handlers/python/templates/readthedocs/language.html.jinja +0 -0
- {mkdocstrings_python-1.10.3 → mkdocstrings_python-1.10.4}/src/mkdocstrings_handlers/python/templates/readthedocs/languages/en.html +0 -0
- {mkdocstrings_python-1.10.3 → mkdocstrings_python-1.10.4}/src/mkdocstrings_handlers/python/templates/readthedocs/languages/en.html.jinja +0 -0
- {mkdocstrings_python-1.10.3 → mkdocstrings_python-1.10.4}/src/mkdocstrings_handlers/python/templates/readthedocs/languages/ja.html +0 -0
- {mkdocstrings_python-1.10.3 → mkdocstrings_python-1.10.4}/src/mkdocstrings_handlers/python/templates/readthedocs/languages/ja.html.jinja +0 -0
- {mkdocstrings_python-1.10.3 → mkdocstrings_python-1.10.4}/src/mkdocstrings_handlers/python/templates/readthedocs/languages/zh.html +0 -0
- {mkdocstrings_python-1.10.3 → mkdocstrings_python-1.10.4}/src/mkdocstrings_handlers/python/templates/readthedocs/languages/zh.html.jinja +0 -0
- {mkdocstrings_python-1.10.3 → mkdocstrings_python-1.10.4}/src/mkdocstrings_handlers/python/templates/readthedocs/style.css +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: mkdocstrings-python
|
|
3
|
-
Version: 1.10.
|
|
3
|
+
Version: 1.10.4
|
|
4
4
|
Summary: A Python handler for mkdocstrings.
|
|
5
5
|
Author-Email: =?utf-8?q?Timoth=C3=A9e_Mazzucotelli?= <dev@pawamoy.fr>
|
|
6
6
|
License: ISC
|
|
@@ -14,6 +14,7 @@ Classifier: Programming Language :: Python :: 3.9
|
|
|
14
14
|
Classifier: Programming Language :: Python :: 3.10
|
|
15
15
|
Classifier: Programming Language :: Python :: 3.11
|
|
16
16
|
Classifier: Programming Language :: Python :: 3.12
|
|
17
|
+
Classifier: Programming Language :: Python :: 3.13
|
|
17
18
|
Classifier: Topic :: Documentation
|
|
18
19
|
Classifier: Topic :: Software Development
|
|
19
20
|
Classifier: Topic :: Utilities
|
|
@@ -28,7 +29,7 @@ Project-URL: Gitter, https://gitter.im/mkdocstrings/python
|
|
|
28
29
|
Project-URL: Funding, https://github.com/sponsors/pawamoy
|
|
29
30
|
Requires-Python: >=3.8
|
|
30
31
|
Requires-Dist: mkdocstrings>=0.25
|
|
31
|
-
Requires-Dist: griffe>=0.
|
|
32
|
+
Requires-Dist: griffe>=0.47
|
|
32
33
|
Description-Content-Type: text/markdown
|
|
33
34
|
|
|
34
35
|
<h1 align="center">mkdocstrings-python</h1>
|
|
@@ -36,9 +37,9 @@ Description-Content-Type: text/markdown
|
|
|
36
37
|
<p align="center">A Python handler for <a href="https://github.com/mkdocstrings/mkdocstrings"><i>mkdocstrings</i></a>.</p>
|
|
37
38
|
|
|
38
39
|
[](https://github.com/mkdocstrings/python/actions?query=workflow%3Aci)
|
|
39
|
-
[](https://mkdocstrings.github.io/python/)
|
|
40
41
|
[](https://pypi.org/project/mkdocstrings-python/)
|
|
41
|
-
[](https://gitpod.io/#https://github.com/mkdocstrings/python)
|
|
42
43
|
[](https://app.gitter.im/#/room/#python:gitter.im)
|
|
43
44
|
|
|
44
45
|
---
|
|
@@ -3,9 +3,9 @@
|
|
|
3
3
|
<p align="center">A Python handler for <a href="https://github.com/mkdocstrings/mkdocstrings"><i>mkdocstrings</i></a>.</p>
|
|
4
4
|
|
|
5
5
|
[](https://github.com/mkdocstrings/python/actions?query=workflow%3Aci)
|
|
6
|
-
[](https://mkdocstrings.github.io/python/)
|
|
7
7
|
[](https://pypi.org/project/mkdocstrings-python/)
|
|
8
|
-
[](https://gitpod.io/#https://github.com/mkdocstrings/python)
|
|
9
9
|
[](https://app.gitter.im/#/room/#python:gitter.im)
|
|
10
10
|
|
|
11
11
|
---
|
|
@@ -25,6 +25,7 @@ classifiers = [
|
|
|
25
25
|
"Programming Language :: Python :: 3.10",
|
|
26
26
|
"Programming Language :: Python :: 3.11",
|
|
27
27
|
"Programming Language :: Python :: 3.12",
|
|
28
|
+
"Programming Language :: Python :: 3.13",
|
|
28
29
|
"Topic :: Documentation",
|
|
29
30
|
"Topic :: Software Development",
|
|
30
31
|
"Topic :: Utilities",
|
|
@@ -32,9 +33,9 @@ classifiers = [
|
|
|
32
33
|
]
|
|
33
34
|
dependencies = [
|
|
34
35
|
"mkdocstrings>=0.25",
|
|
35
|
-
"griffe>=0.
|
|
36
|
+
"griffe>=0.47",
|
|
36
37
|
]
|
|
37
|
-
version = "1.10.
|
|
38
|
+
version = "1.10.4"
|
|
38
39
|
|
|
39
40
|
[project.license]
|
|
40
41
|
text = "ISC"
|
|
@@ -58,3 +59,11 @@ includes = [
|
|
|
58
59
|
"src/mkdocstrings_handlers",
|
|
59
60
|
]
|
|
60
61
|
editable-backend = "editables"
|
|
62
|
+
source-includes = [
|
|
63
|
+
"share",
|
|
64
|
+
]
|
|
65
|
+
|
|
66
|
+
[tool.pdm.build.wheel-data]
|
|
67
|
+
data = [
|
|
68
|
+
{ path = "share/**/*", relative-to = "." },
|
|
69
|
+
]
|
{mkdocstrings_python-1.10.3 → mkdocstrings_python-1.10.4}/src/mkdocstrings_handlers/python/debug.py
RENAMED
|
@@ -37,6 +37,8 @@ class Environment:
|
|
|
37
37
|
"""Python interpreter name."""
|
|
38
38
|
interpreter_version: str
|
|
39
39
|
"""Python interpreter version."""
|
|
40
|
+
interpreter_path: str
|
|
41
|
+
"""Path to Python executable."""
|
|
40
42
|
platform: str
|
|
41
43
|
"""Operating System."""
|
|
42
44
|
packages: list[Package]
|
|
@@ -83,6 +85,7 @@ def get_debug_info() -> Environment:
|
|
|
83
85
|
return Environment(
|
|
84
86
|
interpreter_name=py_name,
|
|
85
87
|
interpreter_version=py_version,
|
|
88
|
+
interpreter_path=sys.executable,
|
|
86
89
|
platform=platform.platform(),
|
|
87
90
|
variables=[Variable(var, val) for var in variables if (val := os.getenv(var))],
|
|
88
91
|
packages=[Package(pkg, get_version(pkg)) for pkg in packages],
|
|
@@ -93,7 +96,7 @@ def print_debug_info() -> None:
|
|
|
93
96
|
"""Print debug/environment information."""
|
|
94
97
|
info = get_debug_info()
|
|
95
98
|
print(f"- __System__: {info.platform}")
|
|
96
|
-
print(f"- __Python__: {info.interpreter_name} {info.interpreter_version}")
|
|
99
|
+
print(f"- __Python__: {info.interpreter_name} {info.interpreter_version} ({info.interpreter_path})")
|
|
97
100
|
print("- __Environment variables__:")
|
|
98
101
|
for var in info.variables:
|
|
99
102
|
print(f" - `{var.name}`: `{var.value}`")
|
|
@@ -53,7 +53,7 @@ patch_loggers(get_logger)
|
|
|
53
53
|
class PythonHandler(BaseHandler):
|
|
54
54
|
"""The Python handler class."""
|
|
55
55
|
|
|
56
|
-
name = "python"
|
|
56
|
+
name: str = "python"
|
|
57
57
|
"""The handler's name."""
|
|
58
58
|
domain: str = "py" # to match Sphinx's default domain
|
|
59
59
|
"""The cross-documentation domain/language for this handler."""
|
|
@@ -197,7 +197,7 @@ class PythonHandler(BaseHandler):
|
|
|
197
197
|
config_file_path: str | None = None,
|
|
198
198
|
paths: list[str] | None = None,
|
|
199
199
|
locale: str = "en",
|
|
200
|
-
load_external_modules: bool =
|
|
200
|
+
load_external_modules: bool | None = None,
|
|
201
201
|
**kwargs: Any,
|
|
202
202
|
) -> None:
|
|
203
203
|
"""Initialize the handler.
|
|
@@ -296,7 +296,7 @@ class PythonHandler(BaseHandler):
|
|
|
296
296
|
if unknown_module:
|
|
297
297
|
extensions = self.normalize_extension_paths(final_config.get("extensions", []))
|
|
298
298
|
loader = GriffeLoader(
|
|
299
|
-
extensions=load_extensions(extensions),
|
|
299
|
+
extensions=load_extensions(*extensions),
|
|
300
300
|
search_paths=self._paths,
|
|
301
301
|
docstring_parser=parser,
|
|
302
302
|
docstring_options=parser_options,
|
|
@@ -474,7 +474,7 @@ def get_handler(
|
|
|
474
474
|
config_file_path: str | None = None,
|
|
475
475
|
paths: list[str] | None = None,
|
|
476
476
|
locale: str = "en",
|
|
477
|
-
load_external_modules: bool =
|
|
477
|
+
load_external_modules: bool | None = None,
|
|
478
478
|
**config: Any, # noqa: ARG001
|
|
479
479
|
) -> PythonHandler:
|
|
480
480
|
"""Simply return an instance of `PythonHandler`.
|
|
@@ -49,7 +49,7 @@ Context:
|
|
|
49
49
|
{% endif %}
|
|
50
50
|
{% with heading_level = heading_level + extra_level %}
|
|
51
51
|
{% for attribute in attributes|order_members(config.members_order, members_list) %}
|
|
52
|
-
{% if members_list is not none or attribute.
|
|
52
|
+
{% if members_list is not none or not attribute.is_imported %}
|
|
53
53
|
{% include attribute|get_template with context %}
|
|
54
54
|
{% endif %}
|
|
55
55
|
{% endfor %}
|
|
@@ -69,7 +69,7 @@ Context:
|
|
|
69
69
|
{% endif %}
|
|
70
70
|
{% with heading_level = heading_level + extra_level %}
|
|
71
71
|
{% for class in classes|order_members(config.members_order, members_list) %}
|
|
72
|
-
{% if members_list is not none or class.
|
|
72
|
+
{% if members_list is not none or not class.is_imported %}
|
|
73
73
|
{% include class|get_template with context %}
|
|
74
74
|
{% endif %}
|
|
75
75
|
{% endfor %}
|
|
@@ -90,7 +90,7 @@ Context:
|
|
|
90
90
|
{% with heading_level = heading_level + extra_level %}
|
|
91
91
|
{% for function in functions|order_members(config.members_order, members_list) %}
|
|
92
92
|
{% if not (obj.kind.value == "class" and function.name == "__init__" and config.merge_init_into_class) %}
|
|
93
|
-
{% if members_list is not none or function.
|
|
93
|
+
{% if members_list is not none or not function.is_imported %}
|
|
94
94
|
{% include function|get_template with context %}
|
|
95
95
|
{% endif %}
|
|
96
96
|
{% endif %}
|
|
@@ -112,7 +112,7 @@ Context:
|
|
|
112
112
|
{% endif %}
|
|
113
113
|
{% with heading_level = heading_level + extra_level %}
|
|
114
114
|
{% for module in modules|order_members(config.members_order.alphabetical, members_list) %}
|
|
115
|
-
{% if members_list is not none or module.
|
|
115
|
+
{% if members_list is not none or not module.is_alias %}
|
|
116
116
|
{% include module|get_template with context %}
|
|
117
117
|
{% endif %}
|
|
118
118
|
{% endfor %}
|
|
@@ -137,7 +137,7 @@ Context:
|
|
|
137
137
|
|
|
138
138
|
{% if not (obj.is_class and child.name == "__init__" and config.merge_init_into_class) %}
|
|
139
139
|
|
|
140
|
-
{% if members_list is not none or child.is_public
|
|
140
|
+
{% if members_list is not none or child.is_public %}
|
|
141
141
|
{% if child.is_attribute %}
|
|
142
142
|
{% with attribute = child %}
|
|
143
143
|
{% include attribute|get_template with context %}
|
|
@@ -1,96 +0,0 @@
|
|
|
1
|
-
"""Configuration for the pytest test suite."""
|
|
2
|
-
|
|
3
|
-
from __future__ import annotations
|
|
4
|
-
|
|
5
|
-
from collections import ChainMap
|
|
6
|
-
from typing import TYPE_CHECKING, Any, Iterator
|
|
7
|
-
|
|
8
|
-
import pytest
|
|
9
|
-
from markdown.core import Markdown
|
|
10
|
-
from mkdocs.config.defaults import MkDocsConfig
|
|
11
|
-
|
|
12
|
-
if TYPE_CHECKING:
|
|
13
|
-
from pathlib import Path
|
|
14
|
-
|
|
15
|
-
from mkdocs import config
|
|
16
|
-
from mkdocstrings.plugin import MkdocstringsPlugin
|
|
17
|
-
|
|
18
|
-
from mkdocstrings_handlers.python.handler import PythonHandler
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
@pytest.fixture(name="mkdocs_conf")
|
|
22
|
-
def fixture_mkdocs_conf(request: pytest.FixtureRequest, tmp_path: Path) -> Iterator[config.Config]:
|
|
23
|
-
"""Yield a MkDocs configuration object.
|
|
24
|
-
|
|
25
|
-
Parameters:
|
|
26
|
-
request: Pytest fixture.
|
|
27
|
-
tmp_path: Pytest fixture.
|
|
28
|
-
|
|
29
|
-
Yields:
|
|
30
|
-
MkDocs config.
|
|
31
|
-
"""
|
|
32
|
-
conf = MkDocsConfig()
|
|
33
|
-
while hasattr(request, "_parent_request") and hasattr(request._parent_request, "_parent_request"):
|
|
34
|
-
request = request._parent_request
|
|
35
|
-
|
|
36
|
-
conf_dict = {
|
|
37
|
-
"site_name": "foo",
|
|
38
|
-
"site_url": "https://example.org/",
|
|
39
|
-
"site_dir": str(tmp_path),
|
|
40
|
-
"plugins": [{"mkdocstrings": {"default_handler": "python"}}],
|
|
41
|
-
**getattr(request, "param", {}),
|
|
42
|
-
}
|
|
43
|
-
# Re-create it manually as a workaround for https://github.com/mkdocs/mkdocs/issues/2289
|
|
44
|
-
mdx_configs: dict[str, Any] = dict(ChainMap(*conf_dict.get("markdown_extensions", [])))
|
|
45
|
-
|
|
46
|
-
conf.load_dict(conf_dict)
|
|
47
|
-
assert conf.validate() == ([], [])
|
|
48
|
-
|
|
49
|
-
conf["mdx_configs"] = mdx_configs
|
|
50
|
-
conf["markdown_extensions"].insert(0, "toc") # Guaranteed to be added by MkDocs.
|
|
51
|
-
|
|
52
|
-
conf = conf["plugins"]["mkdocstrings"].on_config(conf)
|
|
53
|
-
conf = conf["plugins"]["autorefs"].on_config(conf)
|
|
54
|
-
yield conf
|
|
55
|
-
conf["plugins"]["mkdocstrings"].on_post_build(conf)
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
@pytest.fixture(name="plugin")
|
|
59
|
-
def fixture_plugin(mkdocs_conf: config.Config) -> MkdocstringsPlugin:
|
|
60
|
-
"""Return a plugin instance.
|
|
61
|
-
|
|
62
|
-
Parameters:
|
|
63
|
-
mkdocs_conf: Pytest fixture (see conftest.py).
|
|
64
|
-
|
|
65
|
-
Returns:
|
|
66
|
-
mkdocstrings plugin instance.
|
|
67
|
-
"""
|
|
68
|
-
return mkdocs_conf["plugins"]["mkdocstrings"]
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
@pytest.fixture(name="ext_markdown")
|
|
72
|
-
def fixture_ext_markdown(mkdocs_conf: config.Config) -> Markdown:
|
|
73
|
-
"""Return a Markdown instance with MkdocstringsExtension.
|
|
74
|
-
|
|
75
|
-
Parameters:
|
|
76
|
-
mkdocs_conf: Pytest fixture (see conftest.py).
|
|
77
|
-
|
|
78
|
-
Returns:
|
|
79
|
-
A Markdown instance.
|
|
80
|
-
"""
|
|
81
|
-
return Markdown(extensions=mkdocs_conf["markdown_extensions"], extension_configs=mkdocs_conf["mdx_configs"])
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
@pytest.fixture(name="handler")
|
|
85
|
-
def fixture_handler(plugin: MkdocstringsPlugin, ext_markdown: Markdown) -> PythonHandler:
|
|
86
|
-
"""Return a handler instance.
|
|
87
|
-
|
|
88
|
-
Parameters:
|
|
89
|
-
plugin: Pytest fixture (see conftest.py).
|
|
90
|
-
|
|
91
|
-
Returns:
|
|
92
|
-
A handler instance.
|
|
93
|
-
"""
|
|
94
|
-
handler = plugin.handlers.get_handler("python")
|
|
95
|
-
handler._update_env(ext_markdown, plugin.handlers._config)
|
|
96
|
-
return handler
|
|
@@ -1,175 +0,0 @@
|
|
|
1
|
-
"""Tests for the `handler` module."""
|
|
2
|
-
|
|
3
|
-
from __future__ import annotations
|
|
4
|
-
|
|
5
|
-
import os
|
|
6
|
-
from glob import glob
|
|
7
|
-
from textwrap import dedent
|
|
8
|
-
from typing import TYPE_CHECKING
|
|
9
|
-
|
|
10
|
-
import pytest
|
|
11
|
-
from griffe.docstrings.dataclasses import DocstringSectionExamples, DocstringSectionKind
|
|
12
|
-
from griffe.tests import temporary_visited_module
|
|
13
|
-
|
|
14
|
-
from mkdocstrings_handlers.python.handler import CollectionError, PythonHandler, get_handler
|
|
15
|
-
|
|
16
|
-
if TYPE_CHECKING:
|
|
17
|
-
from pathlib import Path
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
def test_collect_missing_module() -> None:
|
|
21
|
-
"""Assert error is raised for missing modules."""
|
|
22
|
-
handler = get_handler(theme="material")
|
|
23
|
-
with pytest.raises(CollectionError):
|
|
24
|
-
handler.collect("aaaaaaaa", {})
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
def test_collect_missing_module_item() -> None:
|
|
28
|
-
"""Assert error is raised for missing items within existing modules."""
|
|
29
|
-
handler = get_handler(theme="material")
|
|
30
|
-
with pytest.raises(CollectionError):
|
|
31
|
-
handler.collect("mkdocstrings.aaaaaaaa", {})
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
def test_collect_module() -> None:
|
|
35
|
-
"""Assert existing module can be collected."""
|
|
36
|
-
handler = get_handler(theme="material")
|
|
37
|
-
assert handler.collect("mkdocstrings", {})
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
def test_collect_with_null_parser() -> None:
|
|
41
|
-
"""Assert we can pass `None` as parser when collecting."""
|
|
42
|
-
handler = get_handler(theme="material")
|
|
43
|
-
assert handler.collect("mkdocstrings", {"docstring_style": None})
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
@pytest.mark.parametrize(
|
|
47
|
-
"handler",
|
|
48
|
-
[
|
|
49
|
-
{"theme": "mkdocs"},
|
|
50
|
-
{"theme": "readthedocs"},
|
|
51
|
-
{"theme": {"name": "material"}},
|
|
52
|
-
],
|
|
53
|
-
indirect=["handler"],
|
|
54
|
-
)
|
|
55
|
-
def test_render_docstring_examples_section(handler: PythonHandler) -> None:
|
|
56
|
-
"""Assert docstrings' examples section can be rendered.
|
|
57
|
-
|
|
58
|
-
Parameters:
|
|
59
|
-
handler: A handler instance (parametrized).
|
|
60
|
-
"""
|
|
61
|
-
section = DocstringSectionExamples(
|
|
62
|
-
value=[
|
|
63
|
-
(DocstringSectionKind.text, "This is an example."),
|
|
64
|
-
(DocstringSectionKind.examples, ">>> print('Hello')\nHello"),
|
|
65
|
-
],
|
|
66
|
-
)
|
|
67
|
-
template = handler.env.get_template("docstring/examples.html.jinja")
|
|
68
|
-
rendered = template.render(section=section, locale="en")
|
|
69
|
-
template.render(section=section, locale="not_existing")
|
|
70
|
-
assert "<p>This is an example.</p>" in rendered
|
|
71
|
-
assert "print" in rendered
|
|
72
|
-
assert "Hello" in rendered
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
def test_expand_globs(tmp_path: Path) -> None:
|
|
76
|
-
"""Assert globs are correctly expanded.
|
|
77
|
-
|
|
78
|
-
Parameters:
|
|
79
|
-
tmp_path: Pytext fixture that creates a temporary directory.
|
|
80
|
-
"""
|
|
81
|
-
globbed_names = (
|
|
82
|
-
"expanded_a",
|
|
83
|
-
"expanded_b",
|
|
84
|
-
"other_expanded_c",
|
|
85
|
-
"other_expanded_d",
|
|
86
|
-
)
|
|
87
|
-
globbed_paths = [tmp_path.joinpath(globbed_name) for globbed_name in globbed_names]
|
|
88
|
-
for path in globbed_paths:
|
|
89
|
-
path.touch()
|
|
90
|
-
handler = PythonHandler(
|
|
91
|
-
handler="python",
|
|
92
|
-
theme="material",
|
|
93
|
-
config_file_path=str(tmp_path.joinpath("mkdocs.yml")),
|
|
94
|
-
paths=["*exp*"],
|
|
95
|
-
)
|
|
96
|
-
for path in globbed_paths:
|
|
97
|
-
assert str(path) in handler._paths
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
def test_expand_globs_without_changing_directory() -> None:
|
|
101
|
-
"""Assert globs are correctly expanded when we are already in the right directory."""
|
|
102
|
-
handler = PythonHandler(
|
|
103
|
-
handler="python",
|
|
104
|
-
theme="material",
|
|
105
|
-
config_file_path="mkdocs.yml",
|
|
106
|
-
paths=["*.md"],
|
|
107
|
-
)
|
|
108
|
-
for path in list(glob(os.path.abspath(".") + "/*.md")):
|
|
109
|
-
assert path in handler._paths
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
@pytest.mark.parametrize(
|
|
113
|
-
("expect_change", "extension"),
|
|
114
|
-
[
|
|
115
|
-
(True, "extension.py"),
|
|
116
|
-
(True, "extension.py:SomeExtension"),
|
|
117
|
-
(True, "path/to/extension.py"),
|
|
118
|
-
(True, "path/to/extension.py:SomeExtension"),
|
|
119
|
-
(True, {"extension.py": {"option": "value"}}),
|
|
120
|
-
(True, {"extension.py:SomeExtension": {"option": "value"}}),
|
|
121
|
-
(True, {"path/to/extension.py": {"option": "value"}}),
|
|
122
|
-
(True, {"path/to/extension.py:SomeExtension": {"option": "value"}}),
|
|
123
|
-
(False, "/absolute/path/to/extension.py"),
|
|
124
|
-
(False, "/absolute/path/to/extension.py:SomeExtension"),
|
|
125
|
-
(False, {"/absolute/path/to/extension.py": {"option": "value"}}),
|
|
126
|
-
(False, {"/absolute/path/to/extension.py:SomeExtension": {"option": "value"}}),
|
|
127
|
-
(False, "dot.notation.path.to.extension"),
|
|
128
|
-
(False, "dot.notation.path.to.pyextension"),
|
|
129
|
-
(False, {"dot.notation.path.to.extension": {"option": "value"}}),
|
|
130
|
-
(False, {"dot.notation.path.to.pyextension": {"option": "value"}}),
|
|
131
|
-
],
|
|
132
|
-
)
|
|
133
|
-
def test_extension_paths(tmp_path: Path, expect_change: bool, extension: str | dict) -> None:
|
|
134
|
-
"""Assert extension paths are resolved relative to config file."""
|
|
135
|
-
handler = get_handler(
|
|
136
|
-
theme="material",
|
|
137
|
-
config_file_path=str(tmp_path.joinpath("mkdocs.yml")),
|
|
138
|
-
)
|
|
139
|
-
normalized = handler.normalize_extension_paths([extension])[0]
|
|
140
|
-
if expect_change:
|
|
141
|
-
if isinstance(normalized, str) and isinstance(extension, str):
|
|
142
|
-
assert normalized == str(tmp_path.joinpath(extension))
|
|
143
|
-
elif isinstance(normalized, dict) and isinstance(extension, dict):
|
|
144
|
-
pth, options = next(iter(extension.items()))
|
|
145
|
-
assert normalized == {str(tmp_path.joinpath(pth)): options}
|
|
146
|
-
else:
|
|
147
|
-
raise ValueError("Normalization must not change extension items type")
|
|
148
|
-
else:
|
|
149
|
-
assert normalized == extension
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
def test_rendering_object_source_without_lineno(handler: PythonHandler) -> None:
|
|
153
|
-
"""Test rendering objects without a line number."""
|
|
154
|
-
code = dedent(
|
|
155
|
-
"""
|
|
156
|
-
'''Module docstring.'''
|
|
157
|
-
|
|
158
|
-
class Class:
|
|
159
|
-
'''Class docstring.'''
|
|
160
|
-
|
|
161
|
-
def function(self):
|
|
162
|
-
'''Function docstring.'''
|
|
163
|
-
|
|
164
|
-
attribute = 0
|
|
165
|
-
'''Attribute docstring.'''
|
|
166
|
-
""",
|
|
167
|
-
)
|
|
168
|
-
with temporary_visited_module(code) as module:
|
|
169
|
-
# TODO: Remove once Griffe does that automatically.
|
|
170
|
-
module.lines_collection[module.filepath] = code.splitlines() # type: ignore[index]
|
|
171
|
-
|
|
172
|
-
module["Class"].lineno = None
|
|
173
|
-
module["Class.function"].lineno = None
|
|
174
|
-
module["attribute"].lineno = None
|
|
175
|
-
assert handler.render(module, {"show_source": True})
|
|
@@ -1,167 +0,0 @@
|
|
|
1
|
-
"""Tests for the `rendering` module."""
|
|
2
|
-
|
|
3
|
-
from __future__ import annotations
|
|
4
|
-
|
|
5
|
-
import re
|
|
6
|
-
from dataclasses import dataclass
|
|
7
|
-
from typing import TYPE_CHECKING, Any
|
|
8
|
-
|
|
9
|
-
import pytest
|
|
10
|
-
from griffe.collections import ModulesCollection
|
|
11
|
-
from griffe.tests import temporary_visited_module
|
|
12
|
-
|
|
13
|
-
from mkdocstrings_handlers.python import rendering
|
|
14
|
-
|
|
15
|
-
if TYPE_CHECKING:
|
|
16
|
-
from markupsafe import Markup
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
@pytest.mark.parametrize(
|
|
20
|
-
"code",
|
|
21
|
-
[
|
|
22
|
-
"print('Hello')",
|
|
23
|
-
"aaaaa(bbbbb, ccccc=1) + ddddd.eeeee[ffff] or {ggggg: hhhhh, iiiii: jjjjj}",
|
|
24
|
-
],
|
|
25
|
-
)
|
|
26
|
-
def test_format_code(code: str) -> None:
|
|
27
|
-
"""Assert code can be Black-formatted.
|
|
28
|
-
|
|
29
|
-
Parameters:
|
|
30
|
-
code: Code to format.
|
|
31
|
-
"""
|
|
32
|
-
for length in (5, 100):
|
|
33
|
-
assert rendering.do_format_code(code, length)
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
@pytest.mark.parametrize(
|
|
37
|
-
("name", "signature"),
|
|
38
|
-
[("Class.method", "(param: str = 'hello') -> 'OtherClass'")],
|
|
39
|
-
)
|
|
40
|
-
def test_format_signature(name: Markup, signature: str) -> None:
|
|
41
|
-
"""Assert signatures can be Black-formatted.
|
|
42
|
-
|
|
43
|
-
Parameters:
|
|
44
|
-
signature: Signature to format.
|
|
45
|
-
"""
|
|
46
|
-
for length in (5, 100):
|
|
47
|
-
assert rendering._format_signature(name, signature, length)
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
@dataclass
|
|
51
|
-
class _FakeObject:
|
|
52
|
-
name: str
|
|
53
|
-
inherited: bool = False
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
@pytest.mark.parametrize(
|
|
57
|
-
("names", "filter_params", "expected_names"),
|
|
58
|
-
[
|
|
59
|
-
(["aa", "ab", "ac", "da"], {"filters": [(re.compile("^a[^b]"), True)]}, {"ab", "da"}),
|
|
60
|
-
(["aa", "ab", "ac", "da"], {"members_list": ["aa", "ab"]}, {"aa", "ab"}),
|
|
61
|
-
],
|
|
62
|
-
)
|
|
63
|
-
def test_filter_objects(names: list[str], filter_params: dict[str, Any], expected_names: set[str]) -> None:
|
|
64
|
-
"""Assert the objects filter works correctly.
|
|
65
|
-
|
|
66
|
-
Parameters:
|
|
67
|
-
names: Names of the objects.
|
|
68
|
-
filter_params: Parameters passed to the filter function.
|
|
69
|
-
expected_names: Names expected to be kept.
|
|
70
|
-
"""
|
|
71
|
-
objects = {name: _FakeObject(name) for name in names}
|
|
72
|
-
filtered = rendering.do_filter_objects(objects, **filter_params) # type: ignore[arg-type]
|
|
73
|
-
filtered_names = {obj.name for obj in filtered}
|
|
74
|
-
assert set(filtered_names) == set(expected_names)
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
@pytest.mark.parametrize(
|
|
78
|
-
("members", "inherited_members", "expected_names"),
|
|
79
|
-
[
|
|
80
|
-
(True, True, {"base", "main"}),
|
|
81
|
-
(True, False, {"main"}),
|
|
82
|
-
(True, ["base"], {"base", "main"}),
|
|
83
|
-
(True, [], {"main"}),
|
|
84
|
-
(False, True, {"base"}),
|
|
85
|
-
(False, False, set()),
|
|
86
|
-
(False, ["base"], {"base"}),
|
|
87
|
-
(False, [], set()),
|
|
88
|
-
([], True, {"base"}),
|
|
89
|
-
([], False, set()),
|
|
90
|
-
([], ["base"], {"base"}),
|
|
91
|
-
([], [], set()),
|
|
92
|
-
(None, True, {"base", "main"}),
|
|
93
|
-
(None, False, {"main"}),
|
|
94
|
-
(None, ["base"], {"base", "main"}),
|
|
95
|
-
(None, [], {"main"}),
|
|
96
|
-
(["base"], True, {"base"}),
|
|
97
|
-
(["base"], False, set()),
|
|
98
|
-
(["base"], ["base"], {"base"}),
|
|
99
|
-
(["base"], [], set()),
|
|
100
|
-
(["main"], True, {"main"}),
|
|
101
|
-
(["main"], False, {"main"}),
|
|
102
|
-
(["main"], ["base"], {"base", "main"}),
|
|
103
|
-
(["main"], [], {"main"}),
|
|
104
|
-
],
|
|
105
|
-
)
|
|
106
|
-
def test_filter_inherited_members(
|
|
107
|
-
members: bool | list[str] | None,
|
|
108
|
-
inherited_members: bool | list[str],
|
|
109
|
-
expected_names: list[str],
|
|
110
|
-
) -> None:
|
|
111
|
-
"""Test inherited members filtering.
|
|
112
|
-
|
|
113
|
-
Parameters:
|
|
114
|
-
members: Members option (parametrized).
|
|
115
|
-
inherited_members: Inherited members option (parametrized).
|
|
116
|
-
expected_names: The expected result as a list of member names.
|
|
117
|
-
"""
|
|
118
|
-
collection = ModulesCollection()
|
|
119
|
-
with temporary_visited_module(
|
|
120
|
-
"""
|
|
121
|
-
class Base:
|
|
122
|
-
def base(self): ...
|
|
123
|
-
|
|
124
|
-
class Main(Base):
|
|
125
|
-
def main(self): ...
|
|
126
|
-
""",
|
|
127
|
-
modules_collection=collection,
|
|
128
|
-
) as module:
|
|
129
|
-
collection["module"] = module
|
|
130
|
-
objects = module["Main"].all_members
|
|
131
|
-
filtered = rendering.do_filter_objects(objects, members_list=members, inherited_members=inherited_members)
|
|
132
|
-
names = {obj.name for obj in filtered}
|
|
133
|
-
assert names == expected_names
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
@pytest.mark.parametrize(
|
|
137
|
-
("order", "members_list", "expected_names"),
|
|
138
|
-
[
|
|
139
|
-
(rendering.Order.alphabetical, None, ["a", "b", "c"]),
|
|
140
|
-
(rendering.Order.source, None, ["c", "b", "a"]),
|
|
141
|
-
(rendering.Order.alphabetical, ["c", "b"], ["c", "b"]),
|
|
142
|
-
(rendering.Order.source, ["a", "c"], ["a", "c"]),
|
|
143
|
-
(rendering.Order.alphabetical, [], ["a", "b", "c"]),
|
|
144
|
-
(rendering.Order.source, [], ["c", "b", "a"]),
|
|
145
|
-
(rendering.Order.alphabetical, True, ["a", "b", "c"]),
|
|
146
|
-
(rendering.Order.source, False, ["c", "b", "a"]),
|
|
147
|
-
],
|
|
148
|
-
)
|
|
149
|
-
def test_ordering_members(order: rendering.Order, members_list: list[str | None], expected_names: list[str]) -> None:
|
|
150
|
-
"""Assert the objects are correctly ordered.
|
|
151
|
-
|
|
152
|
-
Parameters:
|
|
153
|
-
order: The order to use (alphabetical or source).
|
|
154
|
-
members_list: The user specified members list.
|
|
155
|
-
expected_names: The expected ordered list of object names.
|
|
156
|
-
"""
|
|
157
|
-
|
|
158
|
-
class Obj:
|
|
159
|
-
def __init__(self, name: str, lineno: int | None = None, *, is_alias: bool = False) -> None:
|
|
160
|
-
self.name = name
|
|
161
|
-
self.lineno = lineno
|
|
162
|
-
self.alias_lineno = lineno
|
|
163
|
-
self.is_alias = is_alias
|
|
164
|
-
|
|
165
|
-
members = [Obj("a", 10, is_alias=True), Obj("b", 9, is_alias=False), Obj("c", 8, is_alias=True)]
|
|
166
|
-
ordered = rendering.do_order_members(members, order, members_list) # type: ignore[arg-type]
|
|
167
|
-
assert [obj.name for obj in ordered] == expected_names
|