-
Notifications
You must be signed in to change notification settings - Fork 903
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
[darglint
] Implement docstring-missing-exception
and docstring-extraneous-exception
(DAR401
, DAR402
)
#11471
base: main
Are you sure you want to change the base?
Conversation
CodSpeed Performance ReportMerging #11471 will not alter performanceComparing Summary
|
|
code | total | + violation | - violation | + fix | - fix |
---|---|---|---|---|---|
DAR401 | 2237 | 2237 | 0 | 0 | 0 |
DAR402 | 2 | 2 | 0 | 0 | 0 |
Formatter (stable)
✅ ecosystem check detected no format changes.
Formatter (preview)
✅ ecosystem check detected no format changes.
If this PR is accepted, will this preclude |
I'm not opposed to using pydocstyle instead, but I'll wait until I get a review from the ruff team to change anything. |
Summary
These are the first rules implemented as part of #458, but I plan to implement more.
Specifically, this implements
docstring-missing-exception
which checks for raised exceptions not documented in the docstring, anddocstring-extraneous-exception
which checks for exceptions in the docstring not present in the body.Test Plan
Test fixtures added for both google and numpy style.