BUG: Correct functionality of numpydoc SS05#613
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! |
Thank you very much. numpydoc can do with a lot of love, so we appreciate your contribution. |
|
Any updates on this? Looks like it wasn't merged. |
larsoner
left a comment
There was a problem hiding this comment.
Maybe someday we need a
|
Ignore that comment... marking for merge-when-green, thanks in advance @maxinelasp and sorry I missed the ping for review! |
|
FYI I ended up needing to tweak the tests. Nothing too controversial I think -- removed some no-longer-needed ignores, and changed the |
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.