We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 1af9a53 commit 1a6809cCopy full SHA for 1a6809c
src/pytkdocs/parsers/attributes.py
@@ -80,7 +80,7 @@ def get_pairs(nodes):
80
def get_module_or_class_attributes(nodes):
81
result = {}
82
for assignment, string_node in get_pairs(nodes):
83
- string = string_node.s if string_node else None
+ string = dedent(string_node.s) if string_node else None
84
if isinstance(assignment, ast.Assign):
85
names = [target.id for target in assignment.targets]
86
else:
@@ -151,7 +151,7 @@ def get_instance_attributes(func):
151
if not names or (string is None and annotation is None):
152
continue
153
154
- docstring = string.s if string else None
+ docstring = dedent(string.s) if string else None
155
for name in names:
156
result[name] = {"annotation": annotation, "docstring": docstring}
157
0 commit comments