Griffe extension for @warnings.deprecated
(PEP 702).
pip install griffe-warnings-deprecated
The option values in the following examples are the default ones, you can omit them if you like the defaults.
griffe dump mypackage -e griffe_warnings_deprecated
See command-line usage in Griffe's documentation.
import griffe
griffe.load(
"mypackage",
extensions=griffe.load_extensions(
[{"griffe_warnings_deprecated": {
"kind": "danger",
"title": "Deprecated",
"label": "deprecated"
}}]
)
)
See programmatic usage in Griffe's documentation.
plugins:
- mkdocstrings:
handlers:
python:
options:
extensions:
- griffe_warnings_deprecated:
kind: danger
title: Deprecated
See MkDocs usage in Griffe's documentation.
Options:
kind
: The admonition kind (default: danger).title
: The admonition title (default: Deprecated). Can be set to null to use the message as title.label
: The label added to deprecated objects (default: deprecated). Can be set to null.