[(scope)]: Subject
[Body]
```
**Subject and body must be valid Markdown.** Subject must have proper casing (uppercase for first letter if it makes sense), but no dot at the end, and no punctuation in general.
Scope and body are optional. Type can be:
- `build`: About packaging, building wheels, etc.
- `chore`: About packaging or repo/files management.
- `ci`: About Continuous Integration.
- `deps`: Dependencies update.
- `docs`: About documentation.
- `feat`: New feature.
- `fix`: Bug fix.
- `perf`: About performance.
- `refactor`: Changes that are not features or bug fixes.
- `style`: A change in code style/format.
- `tests`: About tests.
If you write a body, please add trailers at the end (for example issues and PR references, or co-authors), without relying on GitHub's flavored Markdown:
```
Body.
Issue #10: https://github.com/namespace/project/issues/10
Related to PR namespace/other-project#15: https://github.com/namespace/other-project/pull/15
```
These "trailers" must appear at the end of the body, without any blank lines between them. The trailer title can contain any character except colons `:`. We expect a full URI for each trailer, not just GitHub autolinks (for example, full GitHub URLs for commits and issues, not the hash or the #issue-number).
We do not enforce a line length on commit messages summary and body, but please avoid very long summaries, and very long lines in the body, unless they are part of code blocks that must not be wrapped.
## Pull requests guidelines
Link to any related issue in the Pull Request message.
During the review, we recommend using fixups:
```bash
# SHA is the SHA of the commit you want to fix
git commit --fixup=SHA
```
Once all the changes are approved, you can squash your commits:
```bash
git rebase -i --autosquash main
```
And force-push:
```bash
git push -f
```
If this seems all too complicated, you can push or force-push each new commit, and we will squash them ourselves if needed, before merging.
mkdocstrings-python-handlers-1.16.10/LICENSE 0000664 0000000 0000000 00000001362 14773515043 0020524 0 ustar 00root root 0000000 0000000 ISC License
Copyright (c) 2021, Timothée Mazzucotelli
Permission to use, copy, modify, and/or distribute this software for any
purpose with or without fee is hereby granted, provided that the above
copyright notice and this permission notice appear in all copies.
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
mkdocstrings-python-handlers-1.16.10/Makefile 0000664 0000000 0000000 00000000760 14773515043 0021160 0 ustar 00root root 0000000 0000000 # If you have `direnv` loaded in your shell, and allow it in the repository,
# the `make` command will point at the `scripts/make` shell script.
# This Makefile is just here to allow auto-completion in the terminal.
actions = \
allrun \
changelog \
check \
check-api \
check-docs \
check-quality \
check-types \
clean \
coverage \
docs \
docs-deploy \
format \
help \
multirun \
release \
run \
setup \
test \
vscode
.PHONY: $(actions)
$(actions):
@python scripts/make "$@"
mkdocstrings-python-handlers-1.16.10/README.md 0000664 0000000 0000000 00000007470 14773515043 0021004 0 ustar 00root root 0000000 0000000 mkdocstrings-python
A Python handler for mkdocstrings.
[](https://github.com/mkdocstrings/python/actions?query=workflow%3Aci)
[](https://mkdocstrings.github.io/python/)
[](https://pypi.org/project/mkdocstrings-python/)
[](https://app.gitter.im/#/room/#python:gitter.im)
---

The Python handler uses [Griffe](https://mkdocstrings.github.io/griffe)
to collect documentation from Python source code.
The word "griffe" can sometimes be used instead of "signature" in French.
Griffe is able to visit the Abstract Syntax Tree (AST) of the source code to extract useful information.
It is also able to execute the code (by importing it) and introspect objects in memory
when source code is not available. Finally, it can parse docstrings following different styles.
## Installation
You can install this handler as a *mkdocstrings* extra:
```toml title="pyproject.toml"
# PEP 621 dependencies declaration
# adapt to your dependencies manager
[project]
dependencies = [
"mkdocstrings[python]>=0.18",
]
```
You can also explicitly depend on the handler:
```toml title="pyproject.toml"
# PEP 621 dependencies declaration
# adapt to your dependencies manager
[project]
dependencies = [
"mkdocstrings-python",
]
```
## Preview

## Features
- **Data collection from source code**: collection of the object-tree and the docstrings is done thanks to
[Griffe](https://github.com/mkdocstrings/griffe).
- **Support for type annotations:** Griffe collects your type annotations and *mkdocstrings* uses them
to display parameter types or return types. It is even able to automatically add cross-references
to other objects from your API, from the standard library or third-party libraries!
See [how to load inventories](https://mkdocstrings.github.io/usage/#cross-references-to-other-projects-inventories) to enable it.
- **Recursive documentation of Python objects:** just use the module dotted-path as an identifier, and you get the full
module docs. You don't need to inject documentation for each class, function, etc.
- **Support for documented attributes:** attributes (variables) followed by a docstring (triple-quoted string) will
be recognized by Griffe in modules, classes and even in `__init__` methods.
- **Multiple docstring-styles support:** common support for Google-style, Numpydoc-style,
and Sphinx-style docstrings. See [Griffe's documentation](https://mkdocstrings.github.io/griffe/docstrings/) on docstrings support.
- **Admonition support in Google docstrings:** blocks like `Note:` or `Warning:` will be transformed
to their [admonition](https://squidfunk.github.io/mkdocs-material/reference/admonitions/) equivalent.
*We do not support nested admonitions in docstrings!*
- **Every object has a TOC entry:** we render a heading for each object, meaning *MkDocs* picks them into the Table
of Contents, which is nicely displayed by the Material theme. Thanks to *mkdocstrings* cross-reference ability,
you can reference other objects within your docstrings, with the classic Markdown syntax:
`[this object][package.module.object]` or directly with `[package.module.object][]`
- **Source code display:** *mkdocstrings* can add a collapsible div containing the highlighted source code
of the Python object.
mkdocstrings-python-handlers-1.16.10/config/ 0000775 0000000 0000000 00000000000 14773515043 0020762 5 ustar 00root root 0000000 0000000 mkdocstrings-python-handlers-1.16.10/config/black.toml 0000664 0000000 0000000 00000000072 14773515043 0022732 0 ustar 00root root 0000000 0000000 [tool.black]
line-length = 120
exclude = "tests/fixtures"
mkdocstrings-python-handlers-1.16.10/config/coverage.ini 0000664 0000000 0000000 00000000652 14773515043 0023261 0 ustar 00root root 0000000 0000000 [coverage:run]
branch = true
parallel = true
source =
src/mkdocstrings_handlers
tests/
[coverage:paths]
equivalent =
src/
.venv/lib/*/site-packages/
.venvs/*/lib/*/site-packages/
[coverage:report]
include_namespace_packages = true
precision = 2
omit =
src/*/__init__.py
src/*/__main__.py
tests/__init__.py
exclude_lines =
pragma: no cover
if TYPE_CHECKING
[coverage:json]
output = htmlcov/coverage.json
mkdocstrings-python-handlers-1.16.10/config/git-changelog.toml 0000664 0000000 0000000 00000000340 14773515043 0024364 0 ustar 00root root 0000000 0000000 bump = "auto"
convention = "angular"
in-place = true
output = "CHANGELOG.md"
parse-refs = false
parse-trailers = true
sections = ["build", "deps", "feat", "fix", "refactor"]
template = "keepachangelog"
versioning = "pep440"
mkdocstrings-python-handlers-1.16.10/config/mypy.ini 0000664 0000000 0000000 00000000252 14773515043 0022460 0 ustar 00root root 0000000 0000000 [mypy]
ignore_missing_imports = true
exclude = tests/fixtures/
warn_unused_ignores = true
show_error_codes = true
namespace_packages = true
explicit_package_bases = true
mkdocstrings-python-handlers-1.16.10/config/pytest.ini 0000664 0000000 0000000 00000000645 14773515043 0023020 0 ustar 00root root 0000000 0000000 [pytest]
python_files =
test_*.py
addopts =
--cov
--cov-config config/coverage.ini
testpaths =
tests
# action:message_regex:warning_class:module_regex:line
filterwarnings =
error
# TODO: Remove once pytest-xdist 4 is released.
ignore:.*rsyncdir:DeprecationWarning:xdist
# TODO: Remove once mkdocstrings stops setting fallback function.
ignore:.*fallback anchor function:DeprecationWarning:mkdocstrings
mkdocstrings-python-handlers-1.16.10/config/ruff.toml 0000664 0000000 0000000 00000004440 14773515043 0022623 0 ustar 00root root 0000000 0000000 target-version = "py39"
line-length = 120
[lint]
exclude = [
"tests/fixtures/*.py",
]
select = [
"A", "ANN", "ARG",
"B", "BLE",
"C", "C4",
"COM",
"D", "DTZ",
"E", "ERA", "EXE",
"F", "FBT",
"G",
"I", "ICN", "INP", "ISC",
"N",
"PGH", "PIE", "PL", "PLC", "PLE", "PLR", "PLW", "PT", "PYI",
"Q",
"RUF", "RSE", "RET",
"S", "SIM", "SLF",
"T", "T10", "T20", "TCH", "TID", "TRY",
"UP",
"W",
"YTT",
]
ignore = [
"A001", # Variable is shadowing a Python builtin
"ANN101", # Missing type annotation for self
"ANN102", # Missing type annotation for cls
"ANN204", # Missing return type annotation for special method __str__
"ANN401", # Dynamically typed expressions (typing.Any) are disallowed
"ARG005", # Unused lambda argument
"C901", # Too complex
"D105", # Missing docstring in magic method
"D417", # Missing argument description in the docstring
"E501", # Line too long
"ERA001", # Commented out code
"G004", # Logging statement uses f-string
"PLR0911", # Too many return statements
"PLR0912", # Too many branches
"PLR0913", # Too many arguments to function call
"PLR0915", # Too many statements
"SLF001", # Private member accessed
"TRY003", # Avoid specifying long messages outside the exception class
]
[lint.per-file-ignores]
"src/**/cli.py" = [
"T201", # Print statement
]
"src/*/debug.py" = [
"T201", # Print statement
]
"!src/*/*.py" = [
"D100", # Missing docstring in public module
]
"!src/**.py" = [
"D101", # Missing docstring in public class
"D103", # Missing docstring in public function
]
"scripts/*.py" = [
"INP001", # File is part of an implicit namespace package
"T201", # Print statement
]
"tests/**.py" = [
"ARG005", # Unused lambda argument
"FBT001", # Boolean positional arg in function definition
"PLR2004", # Magic value used in comparison
"S101", # Use of assert detected
]
[lint.flake8-quotes]
docstring-quotes = "double"
[lint.flake8-tidy-imports]
ban-relative-imports = "all"
[lint.isort]
known-first-party = ["mkdocstrings_handlers.python"]
[lint.pydocstyle]
convention = "google"
[format]
exclude = [
"tests/fixtures/*.py",
]
docstring-code-format = true
docstring-code-line-length = 80
mkdocstrings-python-handlers-1.16.10/config/vscode/ 0000775 0000000 0000000 00000000000 14773515043 0022245 5 ustar 00root root 0000000 0000000 mkdocstrings-python-handlers-1.16.10/config/vscode/launch.json 0000664 0000000 0000000 00000002662 14773515043 0024420 0 ustar 00root root 0000000 0000000 {
"version": "0.2.0",
"configurations": [
{
"name": "python (current file)",
"type": "debugpy",
"request": "launch",
"program": "${file}",
"console": "integratedTerminal",
"justMyCode": false,
"args": "${command:pickArgs}"
},
{
"name": "run",
"type": "debugpy",
"request": "launch",
"module": "python",
"console": "integratedTerminal",
"justMyCode": false,
"args": "${command:pickArgs}"
},
{
"name": "docs",
"type": "debugpy",
"request": "launch",
"module": "mkdocs",
"justMyCode": false,
"args": [
"serve",
"-v"
]
},
{
"name": "test",
"type": "debugpy",
"request": "launch",
"module": "pytest",
"justMyCode": false,
"args": [
"-c=config/pytest.ini",
"-vvv",
"--no-cov",
"--dist=no",
"tests",
"-k=${input:tests_selection}"
]
}
],
"inputs": [
{
"id": "tests_selection",
"type": "promptString",
"description": "Tests selection",
"default": ""
}
]
} mkdocstrings-python-handlers-1.16.10/config/vscode/settings.json 0000664 0000000 0000000 00000001704 14773515043 0025002 0 ustar 00root root 0000000 0000000 {
"files.watcherExclude": {
"**/.venv*/**": true,
"**/.venvs*/**": true,
"**/venv*/**": true
},
"mypy-type-checker.args": [
"--config-file=config/mypy.ini"
],
"python.testing.unittestEnabled": false,
"python.testing.pytestEnabled": true,
"python.testing.pytestArgs": [
"--config-file=config/pytest.ini"
],
"ruff.enable": true,
"ruff.format.args": [
"--config=config/ruff.toml"
],
"ruff.lint.args": [
"--config=config/ruff.toml"
],
"yaml.schemas": {
"https://squidfunk.github.io/mkdocs-material/schema.json": "mkdocs.yml"
},
"yaml.customTags": [
"!ENV scalar",
"!ENV sequence",
"!relative scalar",
"tag:yaml.org,2002:python/name:materialx.emoji.to_svg",
"tag:yaml.org,2002:python/name:materialx.emoji.twemoji",
"tag:yaml.org,2002:python/name:pymdownx.superfences.fence_code_format"
]
} mkdocstrings-python-handlers-1.16.10/config/vscode/tasks.json 0000664 0000000 0000000 00000004605 14773515043 0024272 0 ustar 00root root 0000000 0000000 {
"version": "2.0.0",
"tasks": [
{
"label": "changelog",
"type": "process",
"command": "scripts/make",
"args": ["changelog"]
},
{
"label": "check",
"type": "process",
"command": "scripts/make",
"args": ["check"]
},
{
"label": "check-quality",
"type": "process",
"command": "scripts/make",
"args": ["check-quality"]
},
{
"label": "check-types",
"type": "process",
"command": "scripts/make",
"args": ["check-types"]
},
{
"label": "check-docs",
"type": "process",
"command": "scripts/make",
"args": ["check-docs"]
},
{
"label": "check-api",
"type": "process",
"command": "scripts/make",
"args": ["check-api"]
},
{
"label": "clean",
"type": "process",
"command": "scripts/make",
"args": ["clean"]
},
{
"label": "docs",
"type": "process",
"command": "scripts/make",
"args": ["docs"]
},
{
"label": "docs-deploy",
"type": "process",
"command": "scripts/make",
"args": ["docs-deploy"]
},
{
"label": "format",
"type": "process",
"command": "scripts/make",
"args": ["format"]
},
{
"label": "release",
"type": "process",
"command": "scripts/make",
"args": ["release", "${input:version}"]
},
{
"label": "setup",
"type": "process",
"command": "scripts/make",
"args": ["setup"]
},
{
"label": "test",
"type": "process",
"command": "scripts/make",
"args": ["test", "coverage"],
"group": "test"
},
{
"label": "vscode",
"type": "process",
"command": "scripts/make",
"args": ["vscode"]
}
],
"inputs": [
{
"id": "version",
"type": "promptString",
"description": "Version"
}
]
} mkdocstrings-python-handlers-1.16.10/docs/ 0000775 0000000 0000000 00000000000 14773515043 0020445 5 ustar 00root root 0000000 0000000 mkdocstrings-python-handlers-1.16.10/docs/.glossary.md 0000664 0000000 0000000 00000001570 14773515043 0022713 0 ustar 00root root 0000000 0000000 [__all__]: https://docs.python.org/3/tutorial/modules.html#importing-from-a-package
[class template]: https://github.com/mkdocstrings/python/blob/master/src/mkdocstrings_handlers/python/templates/material/_base/class.html
[function template]: https://github.com/mkdocstrings/python/blob/master/src/mkdocstrings_handlers/python/templates/material/_base/function.html
[autodoc syntax]: https://mkdocstrings.github.io/usage/#autodoc-syntax
[autopages recipe]: https://mkdocstrings.github.io/recipes/#automatic-code-reference-pages
[Griffe]: https://github.com/mkdocstrings/griffe
[ReadTheDocs Sphinx theme]: https://sphinx-rtd-theme.readthedocs.io/en/stable/index.html
[Spacy's documentation]: https://spacy.io/api/doc/
[Black]: https://pypi.org/project/black/
[Material for MkDocs]: https://squidfunk.github.io/mkdocs-material
[Ruff]: https://docs.astral.sh/ruff
*[ToC]: Table of Contents
mkdocstrings-python-handlers-1.16.10/docs/.overrides/ 0000775 0000000 0000000 00000000000 14773515043 0022525 5 ustar 00root root 0000000 0000000 mkdocstrings-python-handlers-1.16.10/docs/.overrides/main.html 0000664 0000000 0000000 00000001100 14773515043 0024327 0 ustar 00root root 0000000 0000000 {% extends "base.html" %}
{% block announce %}
Fund this project through
sponsorship
{% include ".icons/octicons/heart-fill-16.svg" %}
—
Follow
@pawamoy on
{% include ".icons/fontawesome/brands/mastodon.svg" %}
Fosstodon
for updates
{% endblock %}
mkdocstrings-python-handlers-1.16.10/docs/.overrides/partials/ 0000775 0000000 0000000 00000000000 14773515043 0024344 5 ustar 00root root 0000000 0000000 mkdocstrings-python-handlers-1.16.10/docs/.overrides/partials/comments.html 0000664 0000000 0000000 00000004112 14773515043 0027055 0 ustar 00root root 0000000 0000000