Skip to content

Commit 7bec6c4

Browse files
committed
refactor: Don't serialize empty error lists in the result
1 parent 118a027 commit 7bec6c4

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/pytkdocs/cli.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,7 @@ def extract_docstring_parsing_errors(errors: dict, obj: Object) -> None:
124124
errors: The dictionary to update.
125125
obj: The object.
126126
"""
127-
if hasattr(obj, "docstring_errors"):
127+
if hasattr(obj, "docstring_errors") and obj.docstring_errors:
128128
errors[obj.path] = obj.docstring_errors
129129
for child in obj.children:
130130
extract_docstring_parsing_errors(errors, child)

0 commit comments

Comments
 (0)