-
-
Notifications
You must be signed in to change notification settings - Fork 165
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
BUG: Correct functionality of numpydoc SS05 #613
base: main
Are you sure you want to change the base?
Conversation
Hah, so iffy what we're doing here, so I think your suggestion is fine. Given how non-robust this test is, we should probably add a comment explaining our lightweight checker mechanism. pre-commit is complaining; happy to run that for you if you have issues running it locally ( |
Apologies, I didn't see that there was a pre-commit in the project! Looks like it's passing now. |
Great, thanks, can you add a comment to explain what that clause does? Can be as simple as "# Heuristic to check for infinitive verbs". Then I'll go ahead and merge. |
Currently SS05 checks for infinitive verbs by checking if the last character is "s". However, if the first word is "process", which is valid, this incorrectly throws a numpydoc validation error. This commit allows the first word to end in two "s"es without flagging as an error. This will allow for words like "process" or "progress," while still checking for invalid words like "creates."
Sure thing, sorry, I wasn't sure if you meant a comment in the code or elsewhere! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@larsoner Sanity check?
Thank you very much. numpydoc can do with a lot of love, so we appreciate your contribution. |
Currently SS05 checks for infinitive verbs by checking if the last character is "s". However, if the first word is "process", which is valid, this incorrectly throws a numpydoc validation error.
This commit allows the first word to end in two "s"es without flagging as an error. This will allow for words like "process" or "progress," while still checking for invalid words like "creates."
I wasn't sure if I should open an issue for this too, I thought it would be easiest to just find the error and submit a PR, but I'm happy to open an issue as well.