Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MAINT: Changed class constructor __init__ GL08 reporting #592

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

mattgebert
Copy link

Changed validate function in validate.py for empty docstring error GL08 ("The object does not have a docstring"), specifically for __init__ constructors. If an empty docstring for __init__, will first check if class docstring is satisfied for parameter mismatches, before deciding to report GL08 (if mismatches exist, i.e. incomplete documentation).

Implemented new docstring test classes in test_validate.py to verify correct functionality.
Also updated readthedocs format.rst and validation.rst to reflect new changes to constructor checking behavior.

Solves #591.

Note, I think a modification to the readthedocs https://numpydoc.readthedocs.io/en/latest/validation.html#ignoring-validation-checks-with-inline-comments ought to be made

P.s. First time pull requesting to a public repo, let me know if anything is insufficient.

@larsoner
Copy link
Collaborator

Had a quick look at the code and this looks reasonable to me!

Note, I think a modification to the readthedocs https://numpydoc.readthedocs.io/en/latest/validation.html#ignoring-validation-checks-with-inline-comments ought to be made

Sounds good, do you want to add it here?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants