Skip to content

Commit ba54a93

Browse files
committed
Clarify comment.
1 parent 469afd6 commit ba54a93

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

numpydoc/validate.py

+2-1
Original file line numberDiff line numberDiff line change
@@ -578,7 +578,8 @@ def validate(obj_name, validator_cls=None, **validator_kwargs):
578578
else:
579579
doc = validator_cls(obj_name=obj_name, **validator_kwargs)
580580

581-
# module docstring will be lineno 0, which we change to 1 for readability of the output
581+
# lineno is only 0 if we have a module docstring in the file and we are
582+
# validating that, so we change to 1 for readability of the output
582583
ignore_validation_comments = extract_ignore_validation_comments(
583584
doc.source_file_name
584585
).get(doc.source_file_def_line or 1, [])

0 commit comments

Comments
 (0)