Skip to content
This repository has been archived by the owner on Nov 3, 2023. It is now read-only.

D401: Allow multiple imperative forms of the same stem. #382

Merged
merged 6 commits into from
Aug 2, 2019

Conversation

Nurdok
Copy link
Member

@Nurdok Nurdok commented Jul 20, 2019

  • Added tests.
  • Added a line to the release notes.

@Nurdok Nurdok marked this pull request as ready for review July 20, 2019 14:40
@Nurdok Nurdok self-assigned this Jul 20, 2019
@Nurdok Nurdok added the Bugfix label Jul 20, 2019
shacharoo
shacharoo previously approved these changes Jul 20, 2019
Copy link
Member

@shacharoo shacharoo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

image

Copy link
Contributor

@lordmauve lordmauve left a 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?

src/tests/test_utils.py Outdated Show resolved Hide resolved
@@ -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')")
Copy link
Contributor

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"?

Copy link
Member Author

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:

  1. perhaps 'Run', not 'Runs'
  2. 'Run', not 'Runs'
  3. e.g., 'Run' instead of 'Runs'
  4. 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

Copy link
Member Author

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.

Copy link
Contributor

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).

src/pydocstyle/utils.py Outdated Show resolved Hide resolved
@Nurdok Nurdok merged commit 0a2f3ef into master Aug 2, 2019
@samj1912 samj1912 deleted the feature/initiate branch September 6, 2020 18:25
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants