mkdocstrings-python 1.10.0__tar.gz → 1.10.2__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.0 → mkdocstrings_python-1.10.2}/PKG-INFO +2 -2
- {mkdocstrings_python-1.10.0 → mkdocstrings_python-1.10.2}/pyproject.toml +2 -2
- {mkdocstrings_python-1.10.0 → mkdocstrings_python-1.10.2}/src/mkdocstrings_handlers/python/handler.py +33 -3
- {mkdocstrings_python-1.10.0 → mkdocstrings_python-1.10.2}/src/mkdocstrings_handlers/python/rendering.py +42 -8
- mkdocstrings_python-1.10.2/src/mkdocstrings_handlers/python/templates/material/_base/attribute.html +11 -0
- mkdocstrings_python-1.10.2/src/mkdocstrings_handlers/python/templates/material/_base/attribute.html.jinja +120 -0
- mkdocstrings_python-1.10.2/src/mkdocstrings_handlers/python/templates/material/_base/children.html +11 -0
- mkdocstrings_python-1.10.0/src/mkdocstrings_handlers/python/templates/material/_base/children.html → mkdocstrings_python-1.10.2/src/mkdocstrings_handlers/python/templates/material/_base/children.html.jinja +47 -29
- mkdocstrings_python-1.10.2/src/mkdocstrings_handlers/python/templates/material/_base/class.html +11 -0
- mkdocstrings_python-1.10.2/src/mkdocstrings_handlers/python/templates/material/_base/class.html.jinja +192 -0
- mkdocstrings_python-1.10.2/src/mkdocstrings_handlers/python/templates/material/_base/docstring/admonition.html +11 -0
- mkdocstrings_python-1.10.2/src/mkdocstrings_handlers/python/templates/material/_base/docstring/admonition.html.jinja +20 -0
- mkdocstrings_python-1.10.2/src/mkdocstrings_handlers/python/templates/material/_base/docstring/attributes.html +11 -0
- mkdocstrings_python-1.10.2/src/mkdocstrings_handlers/python/templates/material/_base/docstring/attributes.html.jinja +109 -0
- mkdocstrings_python-1.10.2/src/mkdocstrings_handlers/python/templates/material/_base/docstring/classes.html +11 -0
- mkdocstrings_python-1.10.2/src/mkdocstrings_handlers/python/templates/material/_base/docstring/classes.html.jinja +86 -0
- mkdocstrings_python-1.10.2/src/mkdocstrings_handlers/python/templates/material/_base/docstring/examples.html +11 -0
- mkdocstrings_python-1.10.2/src/mkdocstrings_handlers/python/templates/material/_base/docstring/examples.html.jinja +28 -0
- mkdocstrings_python-1.10.2/src/mkdocstrings_handlers/python/templates/material/_base/docstring/functions.html +11 -0
- mkdocstrings_python-1.10.2/src/mkdocstrings_handlers/python/templates/material/_base/docstring/functions.html.jinja +92 -0
- mkdocstrings_python-1.10.2/src/mkdocstrings_handlers/python/templates/material/_base/docstring/modules.html +11 -0
- mkdocstrings_python-1.10.2/src/mkdocstrings_handlers/python/templates/material/_base/docstring/modules.html.jinja +86 -0
- mkdocstrings_python-1.10.2/src/mkdocstrings_handlers/python/templates/material/_base/docstring/other_parameters.html +11 -0
- mkdocstrings_python-1.10.2/src/mkdocstrings_handlers/python/templates/material/_base/docstring/other_parameters.html.jinja +109 -0
- mkdocstrings_python-1.10.2/src/mkdocstrings_handlers/python/templates/material/_base/docstring/parameters.html +11 -0
- mkdocstrings_python-1.10.2/src/mkdocstrings_handlers/python/templates/material/_base/docstring/parameters.html.jinja +132 -0
- mkdocstrings_python-1.10.2/src/mkdocstrings_handlers/python/templates/material/_base/docstring/raises.html +11 -0
- mkdocstrings_python-1.10.2/src/mkdocstrings_handlers/python/templates/material/_base/docstring/raises.html.jinja +102 -0
- mkdocstrings_python-1.10.2/src/mkdocstrings_handlers/python/templates/material/_base/docstring/receives.html +11 -0
- mkdocstrings_python-1.10.2/src/mkdocstrings_handlers/python/templates/material/_base/docstring/receives.html.jinja +122 -0
- mkdocstrings_python-1.10.2/src/mkdocstrings_handlers/python/templates/material/_base/docstring/returns.html +11 -0
- mkdocstrings_python-1.10.2/src/mkdocstrings_handlers/python/templates/material/_base/docstring/returns.html.jinja +122 -0
- mkdocstrings_python-1.10.2/src/mkdocstrings_handlers/python/templates/material/_base/docstring/warns.html +11 -0
- mkdocstrings_python-1.10.2/src/mkdocstrings_handlers/python/templates/material/_base/docstring/warns.html.jinja +102 -0
- mkdocstrings_python-1.10.2/src/mkdocstrings_handlers/python/templates/material/_base/docstring/yields.html +11 -0
- mkdocstrings_python-1.10.2/src/mkdocstrings_handlers/python/templates/material/_base/docstring/yields.html.jinja +122 -0
- mkdocstrings_python-1.10.2/src/mkdocstrings_handlers/python/templates/material/_base/docstring.html +11 -0
- mkdocstrings_python-1.10.2/src/mkdocstrings_handlers/python/templates/material/_base/docstring.html.jinja +53 -0
- mkdocstrings_python-1.10.2/src/mkdocstrings_handlers/python/templates/material/_base/expression.html +11 -0
- mkdocstrings_python-1.10.0/src/mkdocstrings_handlers/python/templates/material/_base/expression.html → mkdocstrings_python-1.10.2/src/mkdocstrings_handlers/python/templates/material/_base/expression.html.jinja +33 -0
- mkdocstrings_python-1.10.2/src/mkdocstrings_handlers/python/templates/material/_base/function.html +11 -0
- mkdocstrings_python-1.10.2/src/mkdocstrings_handlers/python/templates/material/_base/function.html.jinja +144 -0
- mkdocstrings_python-1.10.2/src/mkdocstrings_handlers/python/templates/material/_base/labels.html +11 -0
- mkdocstrings_python-1.10.2/src/mkdocstrings_handlers/python/templates/material/_base/labels.html.jinja +25 -0
- mkdocstrings_python-1.10.2/src/mkdocstrings_handlers/python/templates/material/_base/language.html +11 -0
- mkdocstrings_python-1.10.2/src/mkdocstrings_handlers/python/templates/material/_base/language.html.jinja +18 -0
- mkdocstrings_python-1.10.2/src/mkdocstrings_handlers/python/templates/material/_base/languages/en.html +11 -0
- mkdocstrings_python-1.10.0/src/mkdocstrings_handlers/python/templates/readthedocs/languages/en.html → mkdocstrings_python-1.10.2/src/mkdocstrings_handlers/python/templates/material/_base/languages/en.html.jinja +10 -2
- mkdocstrings_python-1.10.2/src/mkdocstrings_handlers/python/templates/material/_base/languages/ja.html +11 -0
- mkdocstrings_python-1.10.0/src/mkdocstrings_handlers/python/templates/material/_base/languages/ja.html → mkdocstrings_python-1.10.2/src/mkdocstrings_handlers/python/templates/material/_base/languages/ja.html.jinja +10 -2
- mkdocstrings_python-1.10.2/src/mkdocstrings_handlers/python/templates/material/_base/languages/zh.html +11 -0
- mkdocstrings_python-1.10.0/src/mkdocstrings_handlers/python/templates/readthedocs/languages/zh.html → mkdocstrings_python-1.10.2/src/mkdocstrings_handlers/python/templates/material/_base/languages/zh.html.jinja +10 -2
- mkdocstrings_python-1.10.2/src/mkdocstrings_handlers/python/templates/material/_base/module.html +11 -0
- mkdocstrings_python-1.10.2/src/mkdocstrings_handlers/python/templates/material/_base/module.html.jinja +113 -0
- mkdocstrings_python-1.10.2/src/mkdocstrings_handlers/python/templates/material/_base/signature.html +11 -0
- mkdocstrings_python-1.10.2/src/mkdocstrings_handlers/python/templates/material/_base/signature.html.jinja +92 -0
- mkdocstrings_python-1.10.2/src/mkdocstrings_handlers/python/templates/material/_base/summary/attributes.html +11 -0
- mkdocstrings_python-1.10.2/src/mkdocstrings_handlers/python/templates/material/_base/summary/attributes.html.jinja +8 -0
- mkdocstrings_python-1.10.2/src/mkdocstrings_handlers/python/templates/material/_base/summary/classes.html +11 -0
- mkdocstrings_python-1.10.2/src/mkdocstrings_handlers/python/templates/material/_base/summary/classes.html.jinja +8 -0
- mkdocstrings_python-1.10.2/src/mkdocstrings_handlers/python/templates/material/_base/summary/functions.html +11 -0
- mkdocstrings_python-1.10.2/src/mkdocstrings_handlers/python/templates/material/_base/summary/functions.html.jinja +8 -0
- mkdocstrings_python-1.10.2/src/mkdocstrings_handlers/python/templates/material/_base/summary/modules.html +11 -0
- mkdocstrings_python-1.10.2/src/mkdocstrings_handlers/python/templates/material/_base/summary/modules.html.jinja +8 -0
- mkdocstrings_python-1.10.2/src/mkdocstrings_handlers/python/templates/material/_base/summary.html +11 -0
- mkdocstrings_python-1.10.2/src/mkdocstrings_handlers/python/templates/material/_base/summary.html.jinja +8 -0
- mkdocstrings_python-1.10.2/src/mkdocstrings_handlers/python/templates/material/attribute.html +1 -0
- mkdocstrings_python-1.10.2/src/mkdocstrings_handlers/python/templates/material/attribute.html.jinja +1 -0
- mkdocstrings_python-1.10.2/src/mkdocstrings_handlers/python/templates/material/children.html +1 -0
- mkdocstrings_python-1.10.2/src/mkdocstrings_handlers/python/templates/material/children.html.jinja +1 -0
- mkdocstrings_python-1.10.2/src/mkdocstrings_handlers/python/templates/material/class.html +1 -0
- mkdocstrings_python-1.10.2/src/mkdocstrings_handlers/python/templates/material/class.html.jinja +1 -0
- mkdocstrings_python-1.10.2/src/mkdocstrings_handlers/python/templates/material/docstring/admonition.html +1 -0
- mkdocstrings_python-1.10.2/src/mkdocstrings_handlers/python/templates/material/docstring/admonition.html.jinja +1 -0
- mkdocstrings_python-1.10.2/src/mkdocstrings_handlers/python/templates/material/docstring/attributes.html +1 -0
- mkdocstrings_python-1.10.2/src/mkdocstrings_handlers/python/templates/material/docstring/attributes.html.jinja +1 -0
- mkdocstrings_python-1.10.2/src/mkdocstrings_handlers/python/templates/material/docstring/classes.html +1 -0
- mkdocstrings_python-1.10.2/src/mkdocstrings_handlers/python/templates/material/docstring/classes.html.jinja +1 -0
- mkdocstrings_python-1.10.2/src/mkdocstrings_handlers/python/templates/material/docstring/examples.html +1 -0
- mkdocstrings_python-1.10.2/src/mkdocstrings_handlers/python/templates/material/docstring/examples.html.jinja +1 -0
- mkdocstrings_python-1.10.2/src/mkdocstrings_handlers/python/templates/material/docstring/functions.html +1 -0
- mkdocstrings_python-1.10.2/src/mkdocstrings_handlers/python/templates/material/docstring/functions.html.jinja +1 -0
- mkdocstrings_python-1.10.2/src/mkdocstrings_handlers/python/templates/material/docstring/modules.html +1 -0
- mkdocstrings_python-1.10.2/src/mkdocstrings_handlers/python/templates/material/docstring/modules.html.jinja +1 -0
- mkdocstrings_python-1.10.2/src/mkdocstrings_handlers/python/templates/material/docstring/other_parameters.html +1 -0
- mkdocstrings_python-1.10.2/src/mkdocstrings_handlers/python/templates/material/docstring/other_parameters.html.jinja +1 -0
- mkdocstrings_python-1.10.2/src/mkdocstrings_handlers/python/templates/material/docstring/parameters.html +1 -0
- mkdocstrings_python-1.10.2/src/mkdocstrings_handlers/python/templates/material/docstring/parameters.html.jinja +1 -0
- mkdocstrings_python-1.10.2/src/mkdocstrings_handlers/python/templates/material/docstring/raises.html +1 -0
- mkdocstrings_python-1.10.2/src/mkdocstrings_handlers/python/templates/material/docstring/raises.html.jinja +1 -0
- mkdocstrings_python-1.10.2/src/mkdocstrings_handlers/python/templates/material/docstring/receives.html +1 -0
- mkdocstrings_python-1.10.2/src/mkdocstrings_handlers/python/templates/material/docstring/receives.html.jinja +1 -0
- mkdocstrings_python-1.10.2/src/mkdocstrings_handlers/python/templates/material/docstring/returns.html +1 -0
- mkdocstrings_python-1.10.2/src/mkdocstrings_handlers/python/templates/material/docstring/returns.html.jinja +1 -0
- mkdocstrings_python-1.10.2/src/mkdocstrings_handlers/python/templates/material/docstring/warns.html +1 -0
- mkdocstrings_python-1.10.2/src/mkdocstrings_handlers/python/templates/material/docstring/warns.html.jinja +1 -0
- mkdocstrings_python-1.10.2/src/mkdocstrings_handlers/python/templates/material/docstring/yields.html +1 -0
- mkdocstrings_python-1.10.2/src/mkdocstrings_handlers/python/templates/material/docstring/yields.html.jinja +1 -0
- mkdocstrings_python-1.10.2/src/mkdocstrings_handlers/python/templates/material/docstring.html +1 -0
- mkdocstrings_python-1.10.2/src/mkdocstrings_handlers/python/templates/material/docstring.html.jinja +1 -0
- mkdocstrings_python-1.10.2/src/mkdocstrings_handlers/python/templates/material/expression.html +1 -0
- mkdocstrings_python-1.10.2/src/mkdocstrings_handlers/python/templates/material/expression.html.jinja +1 -0
- mkdocstrings_python-1.10.2/src/mkdocstrings_handlers/python/templates/material/function.html +1 -0
- mkdocstrings_python-1.10.2/src/mkdocstrings_handlers/python/templates/material/function.html.jinja +1 -0
- mkdocstrings_python-1.10.2/src/mkdocstrings_handlers/python/templates/material/labels.html +1 -0
- mkdocstrings_python-1.10.2/src/mkdocstrings_handlers/python/templates/material/labels.html.jinja +1 -0
- mkdocstrings_python-1.10.2/src/mkdocstrings_handlers/python/templates/material/language.html +1 -0
- mkdocstrings_python-1.10.2/src/mkdocstrings_handlers/python/templates/material/language.html.jinja +1 -0
- mkdocstrings_python-1.10.2/src/mkdocstrings_handlers/python/templates/material/languages/en.html +1 -0
- mkdocstrings_python-1.10.2/src/mkdocstrings_handlers/python/templates/material/languages/en.html.jinja +1 -0
- mkdocstrings_python-1.10.2/src/mkdocstrings_handlers/python/templates/material/languages/ja.html +1 -0
- mkdocstrings_python-1.10.2/src/mkdocstrings_handlers/python/templates/material/languages/ja.html.jinja +1 -0
- mkdocstrings_python-1.10.2/src/mkdocstrings_handlers/python/templates/material/languages/zh.html +1 -0
- mkdocstrings_python-1.10.2/src/mkdocstrings_handlers/python/templates/material/languages/zh.html.jinja +1 -0
- mkdocstrings_python-1.10.2/src/mkdocstrings_handlers/python/templates/material/module.html +1 -0
- mkdocstrings_python-1.10.2/src/mkdocstrings_handlers/python/templates/material/module.html.jinja +1 -0
- mkdocstrings_python-1.10.2/src/mkdocstrings_handlers/python/templates/material/signature.html +1 -0
- mkdocstrings_python-1.10.2/src/mkdocstrings_handlers/python/templates/material/signature.html.jinja +1 -0
- mkdocstrings_python-1.10.2/src/mkdocstrings_handlers/python/templates/material/summary/attributes.html +1 -0
- mkdocstrings_python-1.10.2/src/mkdocstrings_handlers/python/templates/material/summary/attributes.html.jinja +1 -0
- mkdocstrings_python-1.10.2/src/mkdocstrings_handlers/python/templates/material/summary/classes.html +1 -0
- mkdocstrings_python-1.10.2/src/mkdocstrings_handlers/python/templates/material/summary/classes.html.jinja +1 -0
- mkdocstrings_python-1.10.2/src/mkdocstrings_handlers/python/templates/material/summary/functions.html +1 -0
- mkdocstrings_python-1.10.2/src/mkdocstrings_handlers/python/templates/material/summary/functions.html.jinja +1 -0
- mkdocstrings_python-1.10.2/src/mkdocstrings_handlers/python/templates/material/summary/modules.html +1 -0
- mkdocstrings_python-1.10.2/src/mkdocstrings_handlers/python/templates/material/summary/modules.html.jinja +1 -0
- mkdocstrings_python-1.10.2/src/mkdocstrings_handlers/python/templates/material/summary.html +1 -0
- mkdocstrings_python-1.10.2/src/mkdocstrings_handlers/python/templates/material/summary.html.jinja +1 -0
- mkdocstrings_python-1.10.2/src/mkdocstrings_handlers/python/templates/readthedocs/_base/docstring/attributes.html +11 -0
- mkdocstrings_python-1.10.0/src/mkdocstrings_handlers/python/templates/readthedocs/docstring/attributes.html → mkdocstrings_python-1.10.2/src/mkdocstrings_handlers/python/templates/readthedocs/_base/docstring/attributes.html.jinja +19 -3
- mkdocstrings_python-1.10.2/src/mkdocstrings_handlers/python/templates/readthedocs/_base/docstring/other_parameters.html +11 -0
- mkdocstrings_python-1.10.0/src/mkdocstrings_handlers/python/templates/readthedocs/docstring/other_parameters.html → mkdocstrings_python-1.10.2/src/mkdocstrings_handlers/python/templates/readthedocs/_base/docstring/other_parameters.html.jinja +19 -3
- mkdocstrings_python-1.10.2/src/mkdocstrings_handlers/python/templates/readthedocs/_base/docstring/parameters.html +11 -0
- mkdocstrings_python-1.10.0/src/mkdocstrings_handlers/python/templates/readthedocs/docstring/parameters.html → mkdocstrings_python-1.10.2/src/mkdocstrings_handlers/python/templates/readthedocs/_base/docstring/parameters.html.jinja +20 -4
- mkdocstrings_python-1.10.2/src/mkdocstrings_handlers/python/templates/readthedocs/_base/docstring/raises.html +11 -0
- mkdocstrings_python-1.10.0/src/mkdocstrings_handlers/python/templates/readthedocs/docstring/raises.html → mkdocstrings_python-1.10.2/src/mkdocstrings_handlers/python/templates/readthedocs/_base/docstring/raises.html.jinja +19 -3
- mkdocstrings_python-1.10.2/src/mkdocstrings_handlers/python/templates/readthedocs/_base/docstring/receives.html +11 -0
- mkdocstrings_python-1.10.0/src/mkdocstrings_handlers/python/templates/readthedocs/docstring/receives.html → mkdocstrings_python-1.10.2/src/mkdocstrings_handlers/python/templates/readthedocs/_base/docstring/receives.html.jinja +19 -3
- mkdocstrings_python-1.10.2/src/mkdocstrings_handlers/python/templates/readthedocs/_base/docstring/returns.html +11 -0
- mkdocstrings_python-1.10.2/src/mkdocstrings_handlers/python/templates/readthedocs/_base/docstring/returns.html.jinja +51 -0
- mkdocstrings_python-1.10.2/src/mkdocstrings_handlers/python/templates/readthedocs/_base/docstring/warns.html +11 -0
- mkdocstrings_python-1.10.0/src/mkdocstrings_handlers/python/templates/readthedocs/docstring/warns.html → mkdocstrings_python-1.10.2/src/mkdocstrings_handlers/python/templates/readthedocs/_base/docstring/warns.html.jinja +19 -3
- mkdocstrings_python-1.10.2/src/mkdocstrings_handlers/python/templates/readthedocs/_base/docstring/yields.html +11 -0
- mkdocstrings_python-1.10.0/src/mkdocstrings_handlers/python/templates/readthedocs/docstring/yields.html → mkdocstrings_python-1.10.2/src/mkdocstrings_handlers/python/templates/readthedocs/_base/docstring/yields.html.jinja +19 -3
- mkdocstrings_python-1.10.2/src/mkdocstrings_handlers/python/templates/readthedocs/_base/language.html +11 -0
- mkdocstrings_python-1.10.2/src/mkdocstrings_handlers/python/templates/readthedocs/_base/language.html.jinja +18 -0
- mkdocstrings_python-1.10.2/src/mkdocstrings_handlers/python/templates/readthedocs/_base/languages/en.html +11 -0
- mkdocstrings_python-1.10.0/src/mkdocstrings_handlers/python/templates/material/_base/languages/en.html → mkdocstrings_python-1.10.2/src/mkdocstrings_handlers/python/templates/readthedocs/_base/languages/en.html.jinja +2 -0
- mkdocstrings_python-1.10.2/src/mkdocstrings_handlers/python/templates/readthedocs/_base/languages/ja.html +11 -0
- mkdocstrings_python-1.10.0/src/mkdocstrings_handlers/python/templates/readthedocs/languages/ja.html → mkdocstrings_python-1.10.2/src/mkdocstrings_handlers/python/templates/readthedocs/_base/languages/ja.html.jinja +2 -0
- mkdocstrings_python-1.10.2/src/mkdocstrings_handlers/python/templates/readthedocs/_base/languages/zh.html +11 -0
- mkdocstrings_python-1.10.0/src/mkdocstrings_handlers/python/templates/material/_base/languages/zh.html → mkdocstrings_python-1.10.2/src/mkdocstrings_handlers/python/templates/readthedocs/_base/languages/zh.html.jinja +2 -0
- mkdocstrings_python-1.10.2/src/mkdocstrings_handlers/python/templates/readthedocs/docstring/attributes.html +1 -0
- mkdocstrings_python-1.10.2/src/mkdocstrings_handlers/python/templates/readthedocs/docstring/attributes.html.jinja +1 -0
- mkdocstrings_python-1.10.2/src/mkdocstrings_handlers/python/templates/readthedocs/docstring/other_parameters.html +1 -0
- mkdocstrings_python-1.10.2/src/mkdocstrings_handlers/python/templates/readthedocs/docstring/other_parameters.html.jinja +1 -0
- mkdocstrings_python-1.10.2/src/mkdocstrings_handlers/python/templates/readthedocs/docstring/parameters.html +1 -0
- mkdocstrings_python-1.10.2/src/mkdocstrings_handlers/python/templates/readthedocs/docstring/parameters.html.jinja +1 -0
- mkdocstrings_python-1.10.2/src/mkdocstrings_handlers/python/templates/readthedocs/docstring/raises.html +1 -0
- mkdocstrings_python-1.10.2/src/mkdocstrings_handlers/python/templates/readthedocs/docstring/raises.html.jinja +1 -0
- mkdocstrings_python-1.10.2/src/mkdocstrings_handlers/python/templates/readthedocs/docstring/receives.html +1 -0
- mkdocstrings_python-1.10.2/src/mkdocstrings_handlers/python/templates/readthedocs/docstring/receives.html.jinja +1 -0
- mkdocstrings_python-1.10.2/src/mkdocstrings_handlers/python/templates/readthedocs/docstring/returns.html +1 -0
- mkdocstrings_python-1.10.2/src/mkdocstrings_handlers/python/templates/readthedocs/docstring/returns.html.jinja +1 -0
- mkdocstrings_python-1.10.2/src/mkdocstrings_handlers/python/templates/readthedocs/docstring/warns.html +1 -0
- mkdocstrings_python-1.10.2/src/mkdocstrings_handlers/python/templates/readthedocs/docstring/warns.html.jinja +1 -0
- mkdocstrings_python-1.10.2/src/mkdocstrings_handlers/python/templates/readthedocs/docstring/yields.html +1 -0
- mkdocstrings_python-1.10.2/src/mkdocstrings_handlers/python/templates/readthedocs/docstring/yields.html.jinja +1 -0
- mkdocstrings_python-1.10.2/src/mkdocstrings_handlers/python/templates/readthedocs/language.html +1 -0
- mkdocstrings_python-1.10.2/src/mkdocstrings_handlers/python/templates/readthedocs/language.html.jinja +1 -0
- mkdocstrings_python-1.10.2/src/mkdocstrings_handlers/python/templates/readthedocs/languages/en.html +1 -0
- mkdocstrings_python-1.10.2/src/mkdocstrings_handlers/python/templates/readthedocs/languages/en.html.jinja +1 -0
- mkdocstrings_python-1.10.2/src/mkdocstrings_handlers/python/templates/readthedocs/languages/ja.html +1 -0
- mkdocstrings_python-1.10.2/src/mkdocstrings_handlers/python/templates/readthedocs/languages/ja.html.jinja +1 -0
- mkdocstrings_python-1.10.2/src/mkdocstrings_handlers/python/templates/readthedocs/languages/zh.html +1 -0
- mkdocstrings_python-1.10.2/src/mkdocstrings_handlers/python/templates/readthedocs/languages/zh.html.jinja +1 -0
- {mkdocstrings_python-1.10.0 → mkdocstrings_python-1.10.2}/tests/conftest.py +1 -1
- {mkdocstrings_python-1.10.0 → mkdocstrings_python-1.10.2}/tests/test_handler.py +1 -1
- mkdocstrings_python-1.10.0/src/mkdocstrings_handlers/python/templates/material/_base/attribute.html +0 -80
- mkdocstrings_python-1.10.0/src/mkdocstrings_handlers/python/templates/material/_base/class.html +0 -142
- mkdocstrings_python-1.10.0/src/mkdocstrings_handlers/python/templates/material/_base/docstring/admonition.html +0 -5
- mkdocstrings_python-1.10.0/src/mkdocstrings_handlers/python/templates/material/_base/docstring/attributes.html +0 -90
- mkdocstrings_python-1.10.0/src/mkdocstrings_handlers/python/templates/material/_base/docstring/classes.html +0 -67
- mkdocstrings_python-1.10.0/src/mkdocstrings_handlers/python/templates/material/_base/docstring/examples.html +0 -12
- mkdocstrings_python-1.10.0/src/mkdocstrings_handlers/python/templates/material/_base/docstring/functions.html +0 -73
- mkdocstrings_python-1.10.0/src/mkdocstrings_handlers/python/templates/material/_base/docstring/modules.html +0 -67
- mkdocstrings_python-1.10.0/src/mkdocstrings_handlers/python/templates/material/_base/docstring/other_parameters.html +0 -90
- mkdocstrings_python-1.10.0/src/mkdocstrings_handlers/python/templates/material/_base/docstring/parameters.html +0 -113
- mkdocstrings_python-1.10.0/src/mkdocstrings_handlers/python/templates/material/_base/docstring/raises.html +0 -83
- mkdocstrings_python-1.10.0/src/mkdocstrings_handlers/python/templates/material/_base/docstring/receives.html +0 -103
- mkdocstrings_python-1.10.0/src/mkdocstrings_handlers/python/templates/material/_base/docstring/returns.html +0 -103
- mkdocstrings_python-1.10.0/src/mkdocstrings_handlers/python/templates/material/_base/docstring/warns.html +0 -83
- mkdocstrings_python-1.10.0/src/mkdocstrings_handlers/python/templates/material/_base/docstring/yields.html +0 -103
- mkdocstrings_python-1.10.0/src/mkdocstrings_handlers/python/templates/material/_base/docstring.html +0 -34
- mkdocstrings_python-1.10.0/src/mkdocstrings_handlers/python/templates/material/_base/function.html +0 -98
- mkdocstrings_python-1.10.0/src/mkdocstrings_handlers/python/templates/material/_base/labels.html +0 -8
- mkdocstrings_python-1.10.0/src/mkdocstrings_handlers/python/templates/material/_base/module.html +0 -74
- mkdocstrings_python-1.10.0/src/mkdocstrings_handlers/python/templates/material/_base/signature.html +0 -69
- mkdocstrings_python-1.10.0/src/mkdocstrings_handlers/python/templates/material/_base/summary/attributes.html +0 -0
- mkdocstrings_python-1.10.0/src/mkdocstrings_handlers/python/templates/material/_base/summary/classes.html +0 -0
- mkdocstrings_python-1.10.0/src/mkdocstrings_handlers/python/templates/material/_base/summary/functions.html +0 -0
- mkdocstrings_python-1.10.0/src/mkdocstrings_handlers/python/templates/material/_base/summary/modules.html +0 -0
- mkdocstrings_python-1.10.0/src/mkdocstrings_handlers/python/templates/material/_base/summary.html +0 -0
- mkdocstrings_python-1.10.0/src/mkdocstrings_handlers/python/templates/material/attribute.html +0 -1
- mkdocstrings_python-1.10.0/src/mkdocstrings_handlers/python/templates/material/children.html +0 -1
- mkdocstrings_python-1.10.0/src/mkdocstrings_handlers/python/templates/material/class.html +0 -1
- mkdocstrings_python-1.10.0/src/mkdocstrings_handlers/python/templates/material/docstring/admonition.html +0 -1
- mkdocstrings_python-1.10.0/src/mkdocstrings_handlers/python/templates/material/docstring/attributes.html +0 -1
- mkdocstrings_python-1.10.0/src/mkdocstrings_handlers/python/templates/material/docstring/classes.html +0 -1
- mkdocstrings_python-1.10.0/src/mkdocstrings_handlers/python/templates/material/docstring/examples.html +0 -1
- mkdocstrings_python-1.10.0/src/mkdocstrings_handlers/python/templates/material/docstring/functions.html +0 -1
- mkdocstrings_python-1.10.0/src/mkdocstrings_handlers/python/templates/material/docstring/modules.html +0 -1
- mkdocstrings_python-1.10.0/src/mkdocstrings_handlers/python/templates/material/docstring/other_parameters.html +0 -1
- mkdocstrings_python-1.10.0/src/mkdocstrings_handlers/python/templates/material/docstring/parameters.html +0 -1
- mkdocstrings_python-1.10.0/src/mkdocstrings_handlers/python/templates/material/docstring/raises.html +0 -1
- mkdocstrings_python-1.10.0/src/mkdocstrings_handlers/python/templates/material/docstring/receives.html +0 -1
- mkdocstrings_python-1.10.0/src/mkdocstrings_handlers/python/templates/material/docstring/returns.html +0 -1
- mkdocstrings_python-1.10.0/src/mkdocstrings_handlers/python/templates/material/docstring/warns.html +0 -1
- mkdocstrings_python-1.10.0/src/mkdocstrings_handlers/python/templates/material/docstring/yields.html +0 -1
- mkdocstrings_python-1.10.0/src/mkdocstrings_handlers/python/templates/material/docstring.html +0 -1
- mkdocstrings_python-1.10.0/src/mkdocstrings_handlers/python/templates/material/expression.html +0 -1
- mkdocstrings_python-1.10.0/src/mkdocstrings_handlers/python/templates/material/function.html +0 -1
- mkdocstrings_python-1.10.0/src/mkdocstrings_handlers/python/templates/material/labels.html +0 -1
- mkdocstrings_python-1.10.0/src/mkdocstrings_handlers/python/templates/material/language.html +0 -10
- mkdocstrings_python-1.10.0/src/mkdocstrings_handlers/python/templates/material/languages/en.html +0 -1
- mkdocstrings_python-1.10.0/src/mkdocstrings_handlers/python/templates/material/languages/ja.html +0 -1
- mkdocstrings_python-1.10.0/src/mkdocstrings_handlers/python/templates/material/languages/zh.html +0 -1
- mkdocstrings_python-1.10.0/src/mkdocstrings_handlers/python/templates/material/module.html +0 -1
- mkdocstrings_python-1.10.0/src/mkdocstrings_handlers/python/templates/material/signature.html +0 -1
- mkdocstrings_python-1.10.0/src/mkdocstrings_handlers/python/templates/material/summary/attributes.html +0 -1
- mkdocstrings_python-1.10.0/src/mkdocstrings_handlers/python/templates/material/summary/classes.html +0 -1
- mkdocstrings_python-1.10.0/src/mkdocstrings_handlers/python/templates/material/summary/functions.html +0 -1
- mkdocstrings_python-1.10.0/src/mkdocstrings_handlers/python/templates/material/summary/modules.html +0 -1
- mkdocstrings_python-1.10.0/src/mkdocstrings_handlers/python/templates/material/summary.html +0 -1
- mkdocstrings_python-1.10.0/src/mkdocstrings_handlers/python/templates/readthedocs/docstring/returns.html +0 -35
- mkdocstrings_python-1.10.0/src/mkdocstrings_handlers/python/templates/readthedocs/language.html +0 -10
- {mkdocstrings_python-1.10.0 → mkdocstrings_python-1.10.2}/LICENSE +0 -0
- {mkdocstrings_python-1.10.0 → mkdocstrings_python-1.10.2}/README.md +0 -0
- {mkdocstrings_python-1.10.0 → mkdocstrings_python-1.10.2}/src/mkdocstrings_handlers/python/__init__.py +0 -0
- {mkdocstrings_python-1.10.0 → mkdocstrings_python-1.10.2}/src/mkdocstrings_handlers/python/debug.py +0 -0
- {mkdocstrings_python-1.10.0 → mkdocstrings_python-1.10.2}/src/mkdocstrings_handlers/python/py.typed +0 -0
- {mkdocstrings_python-1.10.0 → mkdocstrings_python-1.10.2}/src/mkdocstrings_handlers/python/templates/material/style.css +0 -0
- {mkdocstrings_python-1.10.0 → mkdocstrings_python-1.10.2}/src/mkdocstrings_handlers/python/templates/readthedocs/style.css +0 -0
- {mkdocstrings_python-1.10.0 → mkdocstrings_python-1.10.2}/tests/__init__.py +0 -0
- {mkdocstrings_python-1.10.0 → mkdocstrings_python-1.10.2}/tests/test_rendering.py +0 -0
- {mkdocstrings_python-1.10.0 → mkdocstrings_python-1.10.2}/tests/test_themes.py +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.2
|
|
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
|
|
@@ -27,7 +27,7 @@ Project-URL: Discussions, https://github.com/mkdocstrings/python/discussions
|
|
|
27
27
|
Project-URL: Gitter, https://gitter.im/mkdocstrings/python
|
|
28
28
|
Project-URL: Funding, https://github.com/sponsors/pawamoy
|
|
29
29
|
Requires-Python: >=3.8
|
|
30
|
-
Requires-Dist: mkdocstrings>=0.
|
|
30
|
+
Requires-Dist: mkdocstrings>=0.25
|
|
31
31
|
Requires-Dist: griffe>=0.44
|
|
32
32
|
Description-Content-Type: text/markdown
|
|
33
33
|
|
|
@@ -9,6 +9,7 @@ import re
|
|
|
9
9
|
import sys
|
|
10
10
|
from collections import ChainMap
|
|
11
11
|
from contextlib import suppress
|
|
12
|
+
from pathlib import Path
|
|
12
13
|
from typing import TYPE_CHECKING, Any, BinaryIO, ClassVar, Iterator, Mapping, Sequence
|
|
13
14
|
|
|
14
15
|
from griffe.collections import LinesCollection, ModulesCollection
|
|
@@ -52,6 +53,8 @@ patch_loggers(get_logger)
|
|
|
52
53
|
class PythonHandler(BaseHandler):
|
|
53
54
|
"""The Python handler class."""
|
|
54
55
|
|
|
56
|
+
name = "python"
|
|
57
|
+
"""The handler's name."""
|
|
55
58
|
domain: str = "py" # to match Sphinx's default domain
|
|
56
59
|
"""The cross-documentation domain/language for this handler."""
|
|
57
60
|
enable_inventory: bool = True
|
|
@@ -208,21 +211,42 @@ class PythonHandler(BaseHandler):
|
|
|
208
211
|
**kwargs: Same thing, but with keyword arguments.
|
|
209
212
|
"""
|
|
210
213
|
super().__init__(*args, **kwargs)
|
|
214
|
+
|
|
215
|
+
# Warn if user overrides base templates.
|
|
216
|
+
if custom_templates := kwargs.get("custom_templates", ()):
|
|
217
|
+
config_dir = Path(config_file_path or "./mkdocs.yml").parent
|
|
218
|
+
for theme_dir in config_dir.joinpath(custom_templates, "python").iterdir():
|
|
219
|
+
if theme_dir.joinpath("_base").is_dir():
|
|
220
|
+
logger.warning(
|
|
221
|
+
f"Overriding base template '{theme_dir.name}/_base/<template>.html.jinja' is not supported, "
|
|
222
|
+
f"override '{theme_dir.name}/<template>.html.jinja' instead",
|
|
223
|
+
)
|
|
224
|
+
|
|
211
225
|
self._config_file_path = config_file_path
|
|
212
226
|
self._load_external_modules = load_external_modules
|
|
213
227
|
paths = paths or []
|
|
228
|
+
|
|
229
|
+
# Expand paths with glob patterns.
|
|
214
230
|
glob_base_dir = os.path.dirname(os.path.abspath(config_file_path)) if config_file_path else "."
|
|
215
231
|
with chdir(glob_base_dir):
|
|
216
232
|
resolved_globs = [glob.glob(path) for path in paths]
|
|
217
233
|
paths = [path for glob_list in resolved_globs for path in glob_list]
|
|
234
|
+
|
|
235
|
+
# By default, add the directory of the config file to the search paths.
|
|
218
236
|
if not paths and config_file_path:
|
|
219
237
|
paths.append(os.path.dirname(config_file_path))
|
|
220
|
-
|
|
238
|
+
|
|
239
|
+
# Initialize search paths from `sys.path`, eliminating empty paths.
|
|
240
|
+
search_paths = [path for path in sys.path if path]
|
|
241
|
+
|
|
221
242
|
for path in reversed(paths):
|
|
243
|
+
# If it's not absolute, make path relative to the config file path, then make it absolute.
|
|
222
244
|
if not os.path.isabs(path) and config_file_path:
|
|
223
245
|
path = os.path.abspath(os.path.join(os.path.dirname(config_file_path), path)) # noqa: PLW2901
|
|
246
|
+
# Don't add duplicates.
|
|
224
247
|
if path not in search_paths:
|
|
225
248
|
search_paths.insert(0, path)
|
|
249
|
+
|
|
226
250
|
self._paths = search_paths
|
|
227
251
|
self._modules_collection: ModulesCollection = ModulesCollection()
|
|
228
252
|
self._lines_collection: LinesCollection = LinesCollection()
|
|
@@ -321,7 +345,7 @@ class PythonHandler(BaseHandler):
|
|
|
321
345
|
def render(self, data: CollectorItem, config: Mapping[str, Any]) -> str: # noqa: D102 (ignore missing docstring)
|
|
322
346
|
final_config = ChainMap(config, self.default_config) # type: ignore[arg-type]
|
|
323
347
|
|
|
324
|
-
template_name = rendering.do_get_template(data)
|
|
348
|
+
template_name = rendering.do_get_template(self.env, data)
|
|
325
349
|
template = self.env.get_template(template_name)
|
|
326
350
|
|
|
327
351
|
# Heading level is a "state" variable, that will change at each step
|
|
@@ -374,7 +398,13 @@ class PythonHandler(BaseHandler):
|
|
|
374
398
|
},
|
|
375
399
|
)
|
|
376
400
|
|
|
377
|
-
def update_env(self, md: Markdown, config: dict) -> None:
|
|
401
|
+
def update_env(self, md: Markdown, config: dict) -> None:
|
|
402
|
+
"""Update the Jinja environment with custom filters and tests.
|
|
403
|
+
|
|
404
|
+
Parameters:
|
|
405
|
+
md: The Markdown instance.
|
|
406
|
+
config: The configuration dictionary.
|
|
407
|
+
"""
|
|
378
408
|
super().update_env(md, config)
|
|
379
409
|
self.env.trim_blocks = True
|
|
380
410
|
self.env.lstrip_blocks = True
|
|
@@ -9,20 +9,23 @@ import string
|
|
|
9
9
|
import sys
|
|
10
10
|
import warnings
|
|
11
11
|
from functools import lru_cache, partial
|
|
12
|
+
from pathlib import Path
|
|
12
13
|
from typing import TYPE_CHECKING, Any, Callable, Match, Pattern, Sequence
|
|
13
14
|
|
|
15
|
+
from griffe.dataclasses import Alias, Object
|
|
14
16
|
from griffe.docstrings.dataclasses import (
|
|
15
17
|
DocstringSectionAttributes,
|
|
16
18
|
DocstringSectionClasses,
|
|
17
19
|
DocstringSectionFunctions,
|
|
18
20
|
DocstringSectionModules,
|
|
19
21
|
)
|
|
20
|
-
from jinja2 import pass_context
|
|
22
|
+
from jinja2 import TemplateNotFound, pass_context, pass_environment
|
|
21
23
|
from markupsafe import Markup
|
|
22
24
|
from mkdocstrings.loggers import get_logger
|
|
23
25
|
|
|
24
26
|
if TYPE_CHECKING:
|
|
25
|
-
from griffe.dataclasses import
|
|
27
|
+
from griffe.dataclasses import Attribute, Class, Function, Module
|
|
28
|
+
from jinja2 import Environment, Template
|
|
26
29
|
from jinja2.runtime import Context
|
|
27
30
|
from mkdocstrings.handlers.base import CollectorItem
|
|
28
31
|
|
|
@@ -137,7 +140,8 @@ def do_format_signature(
|
|
|
137
140
|
The same code, formatted.
|
|
138
141
|
"""
|
|
139
142
|
env = context.environment
|
|
140
|
-
|
|
143
|
+
# TODO: Stop using `do_get_template` when `*.html` templates are removed.
|
|
144
|
+
template = env.get_template(do_get_template(env, "signature"))
|
|
141
145
|
config_annotations = context.parent["config"]["show_signature_annotations"]
|
|
142
146
|
old_stash_ref_filter = env.filters["stash_crossref"]
|
|
143
147
|
|
|
@@ -204,7 +208,8 @@ def do_format_attribute(
|
|
|
204
208
|
The same code, formatted.
|
|
205
209
|
"""
|
|
206
210
|
env = context.environment
|
|
207
|
-
|
|
211
|
+
# TODO: Stop using `do_get_template` when `*.html` templates are removed.
|
|
212
|
+
template = env.get_template(do_get_template(env, "expression"))
|
|
208
213
|
annotations = context.parent["config"]["show_signature_annotations"]
|
|
209
214
|
separate_signature = context.parent["config"]["separate_signature"]
|
|
210
215
|
old_stash_ref_filter = env.filters["stash_crossref"]
|
|
@@ -448,17 +453,46 @@ def _get_black_formatter() -> Callable[[str, int], str]:
|
|
|
448
453
|
return formatter
|
|
449
454
|
|
|
450
455
|
|
|
451
|
-
|
|
456
|
+
@pass_environment
|
|
457
|
+
def do_get_template(env: Environment, obj: str | Object) -> str | Template:
|
|
452
458
|
"""Get the template name used to render an object.
|
|
453
459
|
|
|
454
460
|
Parameters:
|
|
455
|
-
|
|
461
|
+
env: The Jinja environment, passed automatically.
|
|
462
|
+
obj: A Griffe object, or a template name.
|
|
456
463
|
|
|
457
464
|
Returns:
|
|
458
465
|
A template name.
|
|
459
466
|
"""
|
|
460
|
-
|
|
461
|
-
|
|
467
|
+
name = obj
|
|
468
|
+
if isinstance(obj, (Alias, Object)):
|
|
469
|
+
extra_data = getattr(obj, "extra", {}).get("mkdocstrings", {})
|
|
470
|
+
if name := extra_data.get("template", ""):
|
|
471
|
+
return name
|
|
472
|
+
name = obj.kind.value
|
|
473
|
+
try:
|
|
474
|
+
template = env.get_template(f"{name}.html")
|
|
475
|
+
except TemplateNotFound:
|
|
476
|
+
return f"{name}.html.jinja"
|
|
477
|
+
# TODO: Remove once support for Python 3.8 is dropped.
|
|
478
|
+
if sys.version_info < (3, 9):
|
|
479
|
+
try:
|
|
480
|
+
Path(template.filename).relative_to(Path(__file__).parent) # type: ignore[arg-type]
|
|
481
|
+
except ValueError:
|
|
482
|
+
our_template = False
|
|
483
|
+
else:
|
|
484
|
+
our_template = True
|
|
485
|
+
else:
|
|
486
|
+
our_template = Path(template.filename).is_relative_to(Path(__file__).parent) # type: ignore[arg-type]
|
|
487
|
+
if our_template:
|
|
488
|
+
return f"{name}.html.jinja"
|
|
489
|
+
# TODO: Switch to a warning log after some time.
|
|
490
|
+
logger.info(
|
|
491
|
+
f"DeprecationWarning: Overriding '{name}.html' is deprecated, override '{name}.html.jinja' instead. "
|
|
492
|
+
"After some time, this message will be logged as a warning, causing strict builds to fail.",
|
|
493
|
+
once=True,
|
|
494
|
+
)
|
|
495
|
+
return f"{name}.html"
|
|
462
496
|
|
|
463
497
|
|
|
464
498
|
@pass_context
|
mkdocstrings_python-1.10.2/src/mkdocstrings_handlers/python/templates/material/_base/attribute.html
ADDED
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
{% extends "_base/attribute.html.jinja" %}
|
|
2
|
+
|
|
3
|
+
{% block logs scoped %}
|
|
4
|
+
{{ super() }}
|
|
5
|
+
{# TODO: Switch to a warning after some time. #}
|
|
6
|
+
{{ log.info(
|
|
7
|
+
"DeprecationWarning: Extending '_base/attribute.html' is deprecated, extend '_base/attribute.html.jinja' instead. " ~
|
|
8
|
+
"After some time, this message will be logged as a warning, causing strict builds to fail.",
|
|
9
|
+
once=True,
|
|
10
|
+
) }}
|
|
11
|
+
{% endblock logs %}
|
|
@@ -0,0 +1,120 @@
|
|
|
1
|
+
{#- Template for Python attributes.
|
|
2
|
+
|
|
3
|
+
This template renders a Python attribute (or variable).
|
|
4
|
+
This can be a module attribute or a class attribute.
|
|
5
|
+
|
|
6
|
+
Context:
|
|
7
|
+
attribute (griffe.dataclasses.Attribute): The attribute to render.
|
|
8
|
+
root (bool): Whether this is the root object, injected with `:::` in a Markdown page.
|
|
9
|
+
heading_level (int): The HTML heading level to use.
|
|
10
|
+
config (dict): The configuration options.
|
|
11
|
+
-#}
|
|
12
|
+
|
|
13
|
+
{% block logs scoped %}
|
|
14
|
+
{#- Logging block.
|
|
15
|
+
|
|
16
|
+
This block can be used to log debug messages, deprecation messages, warnings, etc.
|
|
17
|
+
-#}
|
|
18
|
+
{{ log.debug("Rendering " + attribute.path) }}
|
|
19
|
+
{% endblock logs %}
|
|
20
|
+
|
|
21
|
+
<div class="doc doc-object doc-attribute">
|
|
22
|
+
{% with obj = attribute, html_id = attribute.path %}
|
|
23
|
+
|
|
24
|
+
{% if root %}
|
|
25
|
+
{% set show_full_path = config.show_root_full_path %}
|
|
26
|
+
{% set root_members = True %}
|
|
27
|
+
{% elif root_members %}
|
|
28
|
+
{% set show_full_path = config.show_root_members_full_path or config.show_object_full_path %}
|
|
29
|
+
{% set root_members = False %}
|
|
30
|
+
{% else %}
|
|
31
|
+
{% set show_full_path = config.show_object_full_path %}
|
|
32
|
+
{% endif %}
|
|
33
|
+
|
|
34
|
+
{% set attribute_name = attribute.path if show_full_path else attribute.name %}
|
|
35
|
+
|
|
36
|
+
{% if not root or config.show_root_heading %}
|
|
37
|
+
{% filter heading(
|
|
38
|
+
heading_level,
|
|
39
|
+
role="data" if attribute.parent.kind.value == "module" else "attr",
|
|
40
|
+
id=html_id,
|
|
41
|
+
class="doc doc-heading",
|
|
42
|
+
toc_label=('<code class="doc-symbol doc-symbol-toc doc-symbol-attribute"></code> '|safe if config.show_symbol_type_toc else '') + attribute.name,
|
|
43
|
+
) %}
|
|
44
|
+
|
|
45
|
+
{% block heading scoped %}
|
|
46
|
+
{#- Heading block.
|
|
47
|
+
|
|
48
|
+
This block renders the heading for the attribute.
|
|
49
|
+
-#}
|
|
50
|
+
{% if config.show_symbol_type_heading %}<code class="doc-symbol doc-symbol-heading doc-symbol-attribute"></code>{% endif %}
|
|
51
|
+
{% if config.separate_signature %}
|
|
52
|
+
<span class="doc doc-object-name doc-attribute-name">{{ attribute_name }}</span>
|
|
53
|
+
{% else %}
|
|
54
|
+
{%+ filter highlight(language="python", inline=True) %}
|
|
55
|
+
{{ attribute_name }}{% if attribute.annotation %}: {{ attribute.annotation }}{% endif %}
|
|
56
|
+
{% if attribute.value %} = {{ attribute.value }}{% endif %}
|
|
57
|
+
{% endfilter %}
|
|
58
|
+
{% endif %}
|
|
59
|
+
{% endblock heading %}
|
|
60
|
+
|
|
61
|
+
{% block labels scoped %}
|
|
62
|
+
{#- Labels block.
|
|
63
|
+
|
|
64
|
+
This block renders the labels for the attribute.
|
|
65
|
+
-#}
|
|
66
|
+
{% with labels = attribute.labels %}
|
|
67
|
+
{% include "labels"|get_template with context %}
|
|
68
|
+
{% endwith %}
|
|
69
|
+
{% endblock labels %}
|
|
70
|
+
|
|
71
|
+
{% endfilter %}
|
|
72
|
+
|
|
73
|
+
{% block signature scoped %}
|
|
74
|
+
{#- Signature block.
|
|
75
|
+
|
|
76
|
+
This block renders the signature for the attribute.
|
|
77
|
+
-#}
|
|
78
|
+
{% if config.separate_signature %}
|
|
79
|
+
{% filter format_attribute(attribute, config.line_length, crossrefs=config.signature_crossrefs) %}
|
|
80
|
+
{{ attribute.name }}
|
|
81
|
+
{% endfilter %}
|
|
82
|
+
{% endif %}
|
|
83
|
+
{% endblock signature %}
|
|
84
|
+
|
|
85
|
+
{% else %}
|
|
86
|
+
|
|
87
|
+
{% if config.show_root_toc_entry %}
|
|
88
|
+
{% filter heading(heading_level,
|
|
89
|
+
role="data" if attribute.parent.kind.value == "module" else "attr",
|
|
90
|
+
id=html_id,
|
|
91
|
+
toc_label=('<code class="doc-symbol doc-symbol-toc doc-symbol-attribute"></code> '|safe if config.show_symbol_type_toc else '') + attribute.name,
|
|
92
|
+
hidden=True,
|
|
93
|
+
) %}
|
|
94
|
+
{% endfilter %}
|
|
95
|
+
{% endif %}
|
|
96
|
+
{% set heading_level = heading_level - 1 %}
|
|
97
|
+
{% endif %}
|
|
98
|
+
|
|
99
|
+
<div class="doc doc-contents {% if root %}first{% endif %}">
|
|
100
|
+
{% block contents scoped %}
|
|
101
|
+
{#- Contents block.
|
|
102
|
+
|
|
103
|
+
This block renders the contents of the attribute.
|
|
104
|
+
It contains other blocks that users can override.
|
|
105
|
+
Overriding the contents block allows to rearrange the order of the blocks.
|
|
106
|
+
-#}
|
|
107
|
+
{% block docstring scoped %}
|
|
108
|
+
{#- Docstring block.
|
|
109
|
+
|
|
110
|
+
This block renders the docstring for the attribute.
|
|
111
|
+
-#}
|
|
112
|
+
{% with docstring_sections = attribute.docstring.parsed %}
|
|
113
|
+
{% include "docstring"|get_template with context %}
|
|
114
|
+
{% endwith %}
|
|
115
|
+
{% endblock docstring %}
|
|
116
|
+
{% endblock contents %}
|
|
117
|
+
</div>
|
|
118
|
+
|
|
119
|
+
{% endwith %}
|
|
120
|
+
</div>
|
mkdocstrings_python-1.10.2/src/mkdocstrings_handlers/python/templates/material/_base/children.html
ADDED
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
{% extends "_base/children.html.jinja" %}
|
|
2
|
+
|
|
3
|
+
{% block logs scoped %}
|
|
4
|
+
{{ super() }}
|
|
5
|
+
{# TODO: Switch to a warning after some time. #}
|
|
6
|
+
{{ log.info(
|
|
7
|
+
"DeprecationWarning: Extending '_base/children.html' is deprecated, extend '_base/children.html.jinja' instead. " ~
|
|
8
|
+
"After some time, this message will be logged as a warning, causing strict builds to fail.",
|
|
9
|
+
once=True,
|
|
10
|
+
) }}
|
|
11
|
+
{% endblock logs %}
|
|
@@ -1,5 +1,23 @@
|
|
|
1
|
+
{#- Template for members (children) of an object.
|
|
2
|
+
|
|
3
|
+
This template iterates on members of a given object and renders them.
|
|
4
|
+
It can group members by category (attributes, classes, functions, modules) or render them in a flat list.
|
|
5
|
+
|
|
6
|
+
Context:
|
|
7
|
+
obj (griffe.dataclasses.Object): The object to render.
|
|
8
|
+
config (dict): The configuration options.
|
|
9
|
+
root_members (bool): Whether the object is the root object.
|
|
10
|
+
heading_level (int): The HTML heading level to use.
|
|
11
|
+
-#}
|
|
12
|
+
|
|
1
13
|
{% if obj.members %}
|
|
2
|
-
{
|
|
14
|
+
{% block logs scoped %}
|
|
15
|
+
{#- Logging block.
|
|
16
|
+
|
|
17
|
+
This block can be used to log debug messages, deprecation messages, warnings, etc.
|
|
18
|
+
-#}
|
|
19
|
+
{{ log.debug("Rendering children of " + obj.path) }}
|
|
20
|
+
{% endblock logs %}
|
|
3
21
|
|
|
4
22
|
<div class="doc doc-children">
|
|
5
23
|
|
|
@@ -20,11 +38,11 @@
|
|
|
20
38
|
{% endif %}
|
|
21
39
|
|
|
22
40
|
{% with attributes = obj.attributes|filter_objects(
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
41
|
+
filters=config.filters,
|
|
42
|
+
members_list=members_list,
|
|
43
|
+
inherited_members=config.inherited_members,
|
|
44
|
+
keep_no_docstrings=config.show_if_no_docstring,
|
|
45
|
+
) %}
|
|
28
46
|
{% if attributes %}
|
|
29
47
|
{% if config.show_category_heading %}
|
|
30
48
|
{% filter heading(heading_level, id=html_id ~ "-attributes") %}Attributes{% endfilter %}
|
|
@@ -40,11 +58,11 @@
|
|
|
40
58
|
{% endwith %}
|
|
41
59
|
|
|
42
60
|
{% with classes = obj.classes|filter_objects(
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
61
|
+
filters=config.filters,
|
|
62
|
+
members_list=members_list,
|
|
63
|
+
inherited_members=config.inherited_members,
|
|
64
|
+
keep_no_docstrings=config.show_if_no_docstring,
|
|
65
|
+
) %}
|
|
48
66
|
{% if classes %}
|
|
49
67
|
{% if config.show_category_heading %}
|
|
50
68
|
{% filter heading(heading_level, id=html_id ~ "-classes") %}Classes{% endfilter %}
|
|
@@ -60,11 +78,11 @@
|
|
|
60
78
|
{% endwith %}
|
|
61
79
|
|
|
62
80
|
{% with functions = obj.functions|filter_objects(
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
81
|
+
filters=config.filters,
|
|
82
|
+
members_list=members_list,
|
|
83
|
+
inherited_members=config.inherited_members,
|
|
84
|
+
keep_no_docstrings=config.show_if_no_docstring,
|
|
85
|
+
) %}
|
|
68
86
|
{% if functions %}
|
|
69
87
|
{% if config.show_category_heading %}
|
|
70
88
|
{% filter heading(heading_level, id=html_id ~ "-functions") %}Functions{% endfilter %}
|
|
@@ -83,11 +101,11 @@
|
|
|
83
101
|
|
|
84
102
|
{% if config.show_submodules %}
|
|
85
103
|
{% with modules = obj.modules|filter_objects(
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
104
|
+
filters=config.filters,
|
|
105
|
+
members_list=members_list,
|
|
106
|
+
inherited_members=config.inherited_members,
|
|
107
|
+
keep_no_docstrings=config.show_if_no_docstring,
|
|
108
|
+
) %}
|
|
91
109
|
{% if modules %}
|
|
92
110
|
{% if config.show_category_heading %}
|
|
93
111
|
{% filter heading(heading_level, id=html_id ~ "-modules") %}Modules{% endfilter %}
|
|
@@ -108,14 +126,14 @@
|
|
|
108
126
|
{% else %}
|
|
109
127
|
|
|
110
128
|
{% for child in obj.all_members
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
129
|
+
|filter_objects(
|
|
130
|
+
filters=config.filters,
|
|
131
|
+
members_list=members_list,
|
|
132
|
+
inherited_members=config.inherited_members,
|
|
133
|
+
keep_no_docstrings=config.show_if_no_docstring,
|
|
134
|
+
)
|
|
135
|
+
|order_members(config.members_order, members_list)
|
|
136
|
+
%}
|
|
119
137
|
|
|
120
138
|
{% if not (obj.is_class and child.name == "__init__" and config.merge_init_into_class) %}
|
|
121
139
|
|
mkdocstrings_python-1.10.2/src/mkdocstrings_handlers/python/templates/material/_base/class.html
ADDED
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
{% extends "_base/class.html.jinja" %}
|
|
2
|
+
|
|
3
|
+
{% block logs scoped %}
|
|
4
|
+
{{ super() }}
|
|
5
|
+
{# TODO: Switch to a warning after some time. #}
|
|
6
|
+
{{ log.info(
|
|
7
|
+
"DeprecationWarning: Extending '_base/class.html' is deprecated, extend '_base/class.html.jinja' instead. " ~
|
|
8
|
+
"After some time, this message will be logged as a warning, causing strict builds to fail.",
|
|
9
|
+
once=True,
|
|
10
|
+
) }}
|
|
11
|
+
{% endblock logs %}
|
|
@@ -0,0 +1,192 @@
|
|
|
1
|
+
{#- Template for Python classes.
|
|
2
|
+
|
|
3
|
+
This template renders a Python class.
|
|
4
|
+
|
|
5
|
+
Context:
|
|
6
|
+
class (griffe.dataclasses.Class): The class to render.
|
|
7
|
+
root (bool): Whether this is the root object, injected with `:::` in a Markdown page.
|
|
8
|
+
heading_level (int): The HTML heading level to use.
|
|
9
|
+
config (dict): The configuration options.
|
|
10
|
+
-#}
|
|
11
|
+
|
|
12
|
+
{% block logs scoped %}
|
|
13
|
+
{#- Logging block.
|
|
14
|
+
|
|
15
|
+
This block can be used to log debug messages, deprecation messages, warnings, etc.
|
|
16
|
+
-#}
|
|
17
|
+
{{ log.debug("Rendering " + class.path) }}
|
|
18
|
+
{% endblock logs %}
|
|
19
|
+
|
|
20
|
+
<div class="doc doc-object doc-class">
|
|
21
|
+
{% with obj = class, html_id = class.path %}
|
|
22
|
+
|
|
23
|
+
{% if root %}
|
|
24
|
+
{% set show_full_path = config.show_root_full_path %}
|
|
25
|
+
{% set root_members = True %}
|
|
26
|
+
{% elif root_members %}
|
|
27
|
+
{% set show_full_path = config.show_root_members_full_path or config.show_object_full_path %}
|
|
28
|
+
{% set root_members = False %}
|
|
29
|
+
{% else %}
|
|
30
|
+
{% set show_full_path = config.show_object_full_path %}
|
|
31
|
+
{% endif %}
|
|
32
|
+
|
|
33
|
+
{% set class_name = class.path if show_full_path else class.name %}
|
|
34
|
+
|
|
35
|
+
{% if not root or config.show_root_heading %}
|
|
36
|
+
{% filter heading(
|
|
37
|
+
heading_level,
|
|
38
|
+
role="class",
|
|
39
|
+
id=html_id,
|
|
40
|
+
class="doc doc-heading",
|
|
41
|
+
toc_label=('<code class="doc-symbol doc-symbol-toc doc-symbol-class"></code> '|safe if config.show_symbol_type_toc else '') + class.name,
|
|
42
|
+
) %}
|
|
43
|
+
|
|
44
|
+
{% block heading scoped %}
|
|
45
|
+
{#- Heading block.
|
|
46
|
+
|
|
47
|
+
This block renders the heading for the class.
|
|
48
|
+
-#}
|
|
49
|
+
{% if config.show_symbol_type_heading %}<code class="doc-symbol doc-symbol-heading doc-symbol-class"></code>{% endif %}
|
|
50
|
+
{% if config.separate_signature %}
|
|
51
|
+
<span class="doc doc-object-name doc-class-name">{{ class_name }}</span>
|
|
52
|
+
{% elif config.merge_init_into_class and "__init__" in class.all_members %}
|
|
53
|
+
{% with function = class.all_members["__init__"] %}
|
|
54
|
+
{%+ filter highlight(language="python", inline=True) %}
|
|
55
|
+
{{ class_name }}{% include "signature"|get_template with context %}
|
|
56
|
+
{% endfilter %}
|
|
57
|
+
{% endwith %}
|
|
58
|
+
{% else %}
|
|
59
|
+
<code>{{ class_name }}</code>
|
|
60
|
+
{% endif %}
|
|
61
|
+
{% endblock heading %}
|
|
62
|
+
|
|
63
|
+
{% block labels scoped %}
|
|
64
|
+
{#- Labels block.
|
|
65
|
+
|
|
66
|
+
This block renders the labels for the class.
|
|
67
|
+
-#}
|
|
68
|
+
{% with labels = class.labels %}
|
|
69
|
+
{% include "labels"|get_template with context %}
|
|
70
|
+
{% endwith %}
|
|
71
|
+
{% endblock labels %}
|
|
72
|
+
|
|
73
|
+
{% endfilter %}
|
|
74
|
+
|
|
75
|
+
{% block signature scoped %}
|
|
76
|
+
{#- Signature block.
|
|
77
|
+
|
|
78
|
+
This block renders the signature for the class.
|
|
79
|
+
-#}
|
|
80
|
+
{% if config.separate_signature and config.merge_init_into_class %}
|
|
81
|
+
{% if "__init__" in class.all_members %}
|
|
82
|
+
{% with function = class.all_members["__init__"] %}
|
|
83
|
+
{% filter format_signature(function, config.line_length, crossrefs=config.signature_crossrefs) %}
|
|
84
|
+
{{ class.name }}
|
|
85
|
+
{% endfilter %}
|
|
86
|
+
{% endwith %}
|
|
87
|
+
{% endif %}
|
|
88
|
+
{% endif %}
|
|
89
|
+
{% endblock signature %}
|
|
90
|
+
|
|
91
|
+
{% else %}
|
|
92
|
+
{% if config.show_root_toc_entry %}
|
|
93
|
+
{% filter heading(heading_level,
|
|
94
|
+
role="class",
|
|
95
|
+
id=html_id,
|
|
96
|
+
toc_label=('<code class="doc-symbol doc-symbol-toc doc-symbol-class"></code> '|safe if config.show_symbol_type_toc else '') + class.name,
|
|
97
|
+
hidden=True,
|
|
98
|
+
) %}
|
|
99
|
+
{% endfilter %}
|
|
100
|
+
{% endif %}
|
|
101
|
+
{% set heading_level = heading_level - 1 %}
|
|
102
|
+
{% endif %}
|
|
103
|
+
|
|
104
|
+
<div class="doc doc-contents {% if root %}first{% endif %}">
|
|
105
|
+
{% block contents scoped %}
|
|
106
|
+
{#- Contents block.
|
|
107
|
+
|
|
108
|
+
This block renders the contents of the class.
|
|
109
|
+
It contains other blocks that users can override.
|
|
110
|
+
Overriding the contents block allows to rearrange the order of the blocks.
|
|
111
|
+
-#}
|
|
112
|
+
{% block bases scoped %}
|
|
113
|
+
{#- Class bases block.
|
|
114
|
+
|
|
115
|
+
This block renders the bases for the class.
|
|
116
|
+
-#}
|
|
117
|
+
{% if config.show_bases and class.bases %}
|
|
118
|
+
<p class="doc doc-class-bases">
|
|
119
|
+
Bases: {% for expression in class.bases -%}
|
|
120
|
+
<code>{% include "expression"|get_template with context %}</code>{% if not loop.last %}, {% endif %}
|
|
121
|
+
{% endfor -%}
|
|
122
|
+
</p>
|
|
123
|
+
{% endif %}
|
|
124
|
+
{% endblock bases %}
|
|
125
|
+
|
|
126
|
+
{% block docstring scoped %}
|
|
127
|
+
{#- Docstring block.
|
|
128
|
+
|
|
129
|
+
This block renders the docstring for the class.
|
|
130
|
+
-#}
|
|
131
|
+
{% with docstring_sections = class.docstring.parsed %}
|
|
132
|
+
{% include "docstring"|get_template with context %}
|
|
133
|
+
{% endwith %}
|
|
134
|
+
{% if config.merge_init_into_class %}
|
|
135
|
+
{% if "__init__" in class.all_members and class.all_members["__init__"].has_docstring %}
|
|
136
|
+
{% with docstring_sections = class.all_members["__init__"].docstring.parsed %}
|
|
137
|
+
{% include "docstring"|get_template with context %}
|
|
138
|
+
{% endwith %}
|
|
139
|
+
{% endif %}
|
|
140
|
+
{% endif %}
|
|
141
|
+
{% endblock docstring %}
|
|
142
|
+
|
|
143
|
+
{% block source scoped %}
|
|
144
|
+
{#- Source block.
|
|
145
|
+
|
|
146
|
+
This block renders the source code for the class.
|
|
147
|
+
-#}
|
|
148
|
+
{% if config.show_source %}
|
|
149
|
+
{% if config.merge_init_into_class %}
|
|
150
|
+
{% if "__init__" in class.all_members and class.all_members["__init__"].source %}
|
|
151
|
+
{% with init = class.all_members["__init__"] %}
|
|
152
|
+
<details class="quote">
|
|
153
|
+
<summary>Source code in <code>
|
|
154
|
+
{%- if init.relative_filepath.is_absolute() -%}
|
|
155
|
+
{{ init.relative_package_filepath }}
|
|
156
|
+
{%- else -%}
|
|
157
|
+
{{ init.relative_filepath }}
|
|
158
|
+
{%- endif -%}
|
|
159
|
+
</code></summary>
|
|
160
|
+
{{ init.source|highlight(language="python", linestart=init.lineno, linenums=True) }}
|
|
161
|
+
</details>
|
|
162
|
+
{% endwith %}
|
|
163
|
+
{% endif %}
|
|
164
|
+
{% elif class.source %}
|
|
165
|
+
<details class="quote">
|
|
166
|
+
<summary>Source code in <code>
|
|
167
|
+
{%- if class.relative_filepath.is_absolute() -%}
|
|
168
|
+
{{ class.relative_package_filepath }}
|
|
169
|
+
{%- else -%}
|
|
170
|
+
{{ class.relative_filepath }}
|
|
171
|
+
{%- endif -%}
|
|
172
|
+
</code></summary>
|
|
173
|
+
{{ class.source|highlight(language="python", linestart=class.lineno, linenums=True) }}
|
|
174
|
+
</details>
|
|
175
|
+
{% endif %}
|
|
176
|
+
{% endif %}
|
|
177
|
+
{% endblock source %}
|
|
178
|
+
|
|
179
|
+
{% block children scoped %}
|
|
180
|
+
{#- Children block.
|
|
181
|
+
|
|
182
|
+
This block renders the children (members) of the class.
|
|
183
|
+
-#}
|
|
184
|
+
{% set root = False %}
|
|
185
|
+
{% set heading_level = heading_level + 1 %}
|
|
186
|
+
{% include "children"|get_template with context %}
|
|
187
|
+
{% endblock children %}
|
|
188
|
+
{% endblock contents %}
|
|
189
|
+
</div>
|
|
190
|
+
|
|
191
|
+
{% endwith %}
|
|
192
|
+
</div>
|