-
-
Notifications
You must be signed in to change notification settings - Fork 2.1k
Run pydocstyle
in pre-commit
#6382
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
Run pydocstyle
in pre-commit
#6382
Conversation
Codecov Report
Additional details and impacted files@@ Coverage Diff @@
## main #6382 +/- ##
===========================================
- Coverage 94.79% 36.60% -58.20%
===========================================
Files 148 148
Lines 27488 27488
===========================================
- Hits 26058 10061 -15997
- Misses 1430 17427 +15997
|
Except for the D100s... it seems like we should have the others enabled and they shouldn't be too hard to fix no? |
Some of them are in conflict with black and have no effect on the output (D202,D203,D204). Those we can keep ignoring. We should enable the others, but that will be one beginner friendly PR per number. |
hooks: | ||
- id: pydocstyle | ||
args: | ||
- --ignore=D100,D101,D102,D103,D104,D105,D107,D200,D202,D203,D204,D205,D209,D212,D213,D301,D400,D401,D403,D413,D415,D417 |
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.
The convention arg is missing, we should be using numpy
as convention (which should remove the contradictory warnings happening all at the same time)
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.
e.g. D212 and D213 make no sense together.
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.
Just tried it, but with --convention
one can't pass --ignore
and then we'd have hundreds of errors and would need to fix them all in one go (unrealistic..)
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.
let's keep ignore then
I have also just realised we have https://github.com/pymc-devs/pymc/blob/main/setup.cfg#L7 which seems to be ignored for some reason? maybe we ought to install |
Includes docstring formatting to reduce the number of error codes that had to be silenced for pydocstyle to be happy. Closes pymc-devs#6378
9d8ea86
to
944b85d
Compare
This runs
pydocstyle
in the pre-commit and fixes a bunch of things it complained about.However, I had to silence many errors that were just too common:
Closes #6378
Checklist
Major / Breaking Changes
Bugfixes / New features
Docs / Maintenance
pydocstyle
in the pre-commit