There was an error while loading. Please reload this page.
1 parent 5cf1403 commit cb2b362Copy full SHA for cb2b362
1 file changed
src/docstringify/nodes/base.py
@@ -40,13 +40,15 @@ def __init__(
40
) = node
41
self.name: str = getattr(node, 'name', self.module_name)
42
43
- docstring = ast.get_docstring(node)
44
- self.docstring = docstring if docstring is None else docstring.strip()
45
-
46
self.get_source_segment: Callable[[ast.AST], str | None] = partial(
47
ast.get_source_segment, source_code
48
)
49
+ @property
+ def docstring(self) -> str | None:
+ docstring = ast.get_docstring(self.ast_node)
50
+ return docstring if docstring is None else docstring.strip()
51
+
52
@property
53
def fully_qualified_name(self) -> str:
54
return (
0 commit comments