Skip to content

Commit

Permalink
Clarify comment.
Browse files Browse the repository at this point in the history
  • Loading branch information
stefmolin committed Jul 2, 2023
1 parent 469afd6 commit ba54a93
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion numpydoc/validate.py
Original file line number Diff line number Diff line change
Expand Up @@ -578,7 +578,8 @@ def validate(obj_name, validator_cls=None, **validator_kwargs):
else:
doc = validator_cls(obj_name=obj_name, **validator_kwargs)

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

0 comments on commit ba54a93

Please sign in to comment.