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.