File tree Expand file tree Collapse file tree 1 file changed +9
-2
lines changed
src/griffe_sphinx/_internal Expand file tree Collapse file tree 1 file changed +9
-2
lines changed Original file line number Diff line number Diff line change 44
55import griffe
66
7- logger = griffe .get_logger ("griffe_sphinx" )
7+ _logger = griffe .get_logger ("griffe_sphinx" )
88
99
1010class 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),
You can’t perform that action at this time.
0 commit comments