Skip to content

extension ¤

Griffe extension for @warnings.deprecated (PEP 702).

Classes:

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 ¤

on_class_instance(*, cls: Class, **kwargs: Any) -> None

Add section to docstrings of deprecated classes.

on_function_instance ¤

on_function_instance(
    *, func: Function, **kwargs: Any
) -> None

Add section to docstrings of deprecated functions.