Skip to content

Commit f8ab500

Browse files
committed
docs: Fix API/inventory mismatch
1 parent a72049b commit f8ab500

File tree

1 file changed

+8
-6
lines changed

1 file changed

+8
-6
lines changed

src/griffe_warnings_deprecated/_internal/extension.py

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
"""Griffe extension for `@warnings.deprecated` (PEP 702)."""
1+
# Griffe extension for `@warnings.deprecated` (PEP 702).
22

33
from __future__ import annotations
44

@@ -7,10 +7,9 @@
77

88
from griffe import Class, Docstring, DocstringSectionAdmonition, ExprCall, Extension, Function, get_logger
99

10-
logger = get_logger(__name__)
11-
self_namespace = "griffe_warnings_deprecated"
12-
mkdocstrings_namespace = "mkdocstrings"
13-
10+
_logger = get_logger(__name__)
11+
_self_namespace = "griffe_warnings_deprecated"
12+
_mkdocstrings_namespace = "mkdocstrings"
1413
_decorators = {"warnings.deprecated", "typing_extensions.deprecated"}
1514

1615

@@ -21,7 +20,7 @@ def _deprecated(obj: Class | Function) -> str | None:
2120
try:
2221
return ast.literal_eval(first_arg) # type: ignore[arg-type]
2322
except ValueError:
24-
logger.debug("%s is not a static string", str(first_arg))
23+
_logger.debug("%s is not a static string", str(first_arg))
2524
return None
2625
return None
2726

@@ -44,8 +43,11 @@ def __init__(
4443
"""
4544
super().__init__()
4645
self.kind = kind
46+
"""The kind of the admonition to insert in the docstring."""
4747
self.title = title or ""
48+
"""The title of the admonition to insert in the docstring."""
4849
self.label = label
50+
"""The label added to deprecated objects."""
4951

5052
def _insert_message(self, obj: Function | Class, message: str) -> None:
5153
title = self.title

0 commit comments

Comments
 (0)