-
Notifications
You must be signed in to change notification settings - Fork 188
D401: Allow multiple imperative forms of the same stem. #382
Conversation
Nurdok
commented
Jul 20, 2019
•
edited
Loading
edited
- Added tests.
- Added a line to the release notes.
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.
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.
Thanks for this. I spotted some issues in my own code when you reviewed it back to me. Want me to fix them?
@@ -16,7 +16,8 @@ def docstring_bad_ignore_one(): # noqa: D400,D401,D415 | |||
pass | |||
|
|||
|
|||
@expect("D401: First line should be in imperative mood ('Run', not 'Runs')") | |||
@expect("D401: First line should be in imperative mood " | |||
"(perhaps 'Run', not 'Runs')") |
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.
"perhaps y, not x" reads clumsily to me. Adding "perhaps y" suggests a lot less confidence in the recommendation, while "not x" seems very confident.
Maybe "eg. y instead of x"?
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.
Seeing as the bug was caused by two different imperative forms of the same stem, I was indeed going for a less confident recommendation.
Some options here:
- perhaps 'Run', not 'Runs'
- 'Run', not 'Runs'
- e.g., 'Run' instead of 'Runs'
- perhaps 'Run' instead of 'Runs'
I chose (1) because it's more clear that 'Runs' is definitely bad while 'Run' is not necessarily the right choice.
@shacharoo LMKWYT
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.
I'm merging so that other PRs are unblocked, I think the current phrasing is fine for now, but we can revisit it before the next release.
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.
Thanks. (I like 3 and 4 for what it's worth).