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

Add ignore-self-only-init option #560

Merged
merged 9 commits into from
Jan 17, 2023
Merged

Conversation

thejcannon
Copy link
Contributor

Adding an option ignore-self-only-init (off by default) which will not report a D107 error if __init__ has no parameters other than self. The justification is that these methods usually aren't very interesting and will likely result in redundant/boring docstrings which add noise.

Just turning off D107 isn't an option, since there are __init__ methods which are interesting ;)

Please make sure to check for the following items:

  • Add unit tests and integration tests where applicable.
  • Add a line to the release notes (docs/release_notes.rst) under "Current Development Version".

@thejcannon
Copy link
Contributor Author

Of course, the option name is up for debate :)

Copy link
Member

@samj1912 samj1912 left a comment

Choose a reason for hiding this comment

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

Hey @thejcannon - thanks for the PR! Sorry for the delay in getting to review this. It generally looks good to me. Just a minor comment re:naming.

src/pydocstyle/parser.py Outdated Show resolved Hide resolved
@samj1912
Copy link
Member

@thejcannon could you please rebase this PR against the master branch? Thanks!

@thejcannon
Copy link
Contributor Author

Better late than never 😅

@thejcannon
Copy link
Contributor Author

@samj1912 got time for a quick review?

Copy link
Member

@samj1912 samj1912 left a comment

Choose a reason for hiding this comment

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

Minor comment about release notes. Lgtm apart from that.

docs/release_notes.rst Outdated Show resolved Hide resolved
@samj1912 samj1912 enabled auto-merge (squash) January 17, 2023 19:51
@samj1912 samj1912 merged commit a9a73f9 into PyCQA:master Jan 17, 2023
@thejcannon thejcannon deleted the unary_init branch January 17, 2023 20:01
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants