Skip to content

Commit 37c56e2

Browse files
committed
chore: Cleanup
1 parent 3ddbacc commit 37c56e2

File tree

1 file changed

+9
-2
lines changed

1 file changed

+9
-2
lines changed

src/griffe_sphinx/_internal/extension.py

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
import griffe
66

7-
logger = griffe.get_logger("griffe_sphinx")
7+
_logger = griffe.get_logger("griffe_sphinx")
88

99

1010
class SphinxCommentsExtension(griffe.Extension):
@@ -17,9 +17,16 @@ def on_attribute_instance(
1717
agent: griffe.Visitor | griffe.Inspector,
1818
**kwargs: Any, # noqa: ARG002
1919
) -> None:
20+
"""Parse Sphinx-comments above attributes as docstrings.
21+
22+
Parameters:
23+
attr: The attribute being visited.
24+
agent: The visitor or inspector visiting the attribute.
25+
**kwargs: Additional keyword arguments.
26+
"""
2027
if attr.docstring is None:
2128
if attr.lineno is None or attr.endlineno is None:
22-
logger.debug(f"Skipping Sphinx-comments parsing for {attr.path}: lineno or endlineno is None")
29+
_logger.debug(f"Skipping Sphinx-comments parsing for {attr.path}: lineno or endlineno is None")
2330
return
2431
if isinstance(attr.filepath, list):
2532
# This should never happen (an attribute cannot be defined in a directory/native-namespace package),

0 commit comments

Comments
 (0)