-
Notifications
You must be signed in to change notification settings - Fork 221
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
Add flake8-docstrings to CI #748
Closed
Closed
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Codecov Report
Additional details and impacted files@@ Coverage Diff @@
## master #748 +/- ##
==========================================
- Coverage 81.38% 80.81% -0.57%
==========================================
Files 154 144 -10
Lines 10007 9619 -388
==========================================
- Hits 8144 7774 -370
+ Misses 1863 1845 -18
Flags with carried forward coverage won't be shown. Click here to find out more.
|
Closed
Closed
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
What is this?
See this note!
This PR adds
flake-docstrings
to lint docstrings. Originally I was setting the convention option toNumPy
howeverflake-docstrings
excludesD417-Missing argument descriptions in the docstring
forNumPy
. Instead, we disable the codes manually.I've also fixed some faulty docstring formatting, specifically in the return statements for the detectors. Fixes #759
Notes
E121, E123, E126, E226, E24, E704, W503, W504
I've kept these defaults with the exception ofE226 missing whitespace around arithmetic operator
.Flake8-docstrings
consider the following list of rules exceptions to theNumPy
convection.D203, D212, D213, D402, D413, D415, D416
. I've manually disabled these in order to enableD107
andD417
. D107 enforces__init__
's to have docstrings andD417
enforces all parameters to be listed in docstring.D1, D401, D205, D400
. These have been added toignores
because implementing them here would be a very big job. I suggest we find some way of doing this iteratively!D403
due to this issueD208
due to conflicts with returns statement formatting.