griffe_warnings_deprecated
¤
griffe-warnings-deprecated package.
Griffe extension for @warnings.deprecated (PEP 702).
Modules:
-
extension–Deprecated. Import from
griffe_warnings_deprecateddirectly.
Classes:
-
WarningsDeprecatedExtension–Griffe extension for
@warnings.deprecated(PEP 702).
WarningsDeprecatedExtension
¤
WarningsDeprecatedExtension(
kind: str = "danger",
title: str | None = "Deprecated",
label: str | None = "deprecated",
)
Bases: Extension
Griffe extension for @warnings.deprecated (PEP 702).
Parameters:
-
(kind¤str, default:'danger') –Admonitions kind.
-
(title¤str | None, default:'Deprecated') –Admonitions title.
-
(label¤str | None, default:'deprecated') –Label added to deprecated objects.
Methods:
-
on_class_instance–Add section to docstrings of deprecated classes.
-
on_function_instance–Add section to docstrings of deprecated functions.
Attributes:
-
kind–The kind of the admonition to insert in the docstring.
-
label–The label added to deprecated objects.
-
title–The title of the admonition to insert in the docstring.
Source code in src/griffe_warnings_deprecated/_internal/extension.py
31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 | |
title
instance-attribute
¤
title = title or ''
The title of the admonition to insert in the docstring.
on_class_instance
¤
on_class_instance(*, cls: Class, **kwargs: Any) -> None
Add section to docstrings of deprecated classes.
Source code in src/griffe_warnings_deprecated/_internal/extension.py
61 62 63 64 65 66 67 | |
on_function_instance
¤
on_function_instance(
*, func: Function, **kwargs: Any
) -> None
Add section to docstrings of deprecated functions.
Source code in src/griffe_warnings_deprecated/_internal/extension.py
69 70 71 72 73 74 75 | |