Improve flake8 checks#1132
Merged
Merged
Conversation
majorgreys
reviewed
Nov 13, 2019
majorgreys
left a comment
Contributor
There was a problem hiding this comment.
I think all but the removal of single quote enforcement seems to be an obvious yes. I'm ok with approving this PR before we make a decision on black but would also like us to have a clear path set out for adopting black if we remove this enforcement.
Contributor
Author
|
I'm also working on getting black. As you noticed, this single quote thing will get in the way anyway. |
majorgreys
previously approved these changes
Nov 13, 2019
The current quote enforcement is a restrictive and annoying. Furthermore, it arbitrary enforces single quotes whereas tools like black — which are now standard in Python ecosystem — sticks to the Python widely used double quotes.
Checks that no except statement is used without specifying an exception type.
We only ignore W503 in favor of W504 to define where we put the line break before binary operators.
This makes sure we pick proper variable names.
This makes sure that we use a correct logging format in our log strings.
This fixes various RST directives that we got wrong and log format
majorgreys
self-requested a review
November 18, 2019 18:27
majorgreys
approved these changes
Nov 18, 2019
This file contains hidden or 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
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.
Remove quote enforcement
The current quote enforcement is a restrictive and annoying.
Furthermore, it arbitrary enforces single quotes whereas tools like black —
which are now standard in Python ecosystem — sticks to the Python widely used
double quotes.
Add flake8-blind-except
Checks that no except statement is used without specifying an exception type.
flake8: ignore no error
We only ignore W503 in favor of W504 to define where we put the line break
before binary operators.
Add flake8-builtins
This makes sure we pick proper variable names.
Add flake8-logging-format
This makes sure that we use a correct logging format in our log strings.
Enable flake8-rst-docstrings
This fixes various RST directives that we got wrong and log format
flake8: enable flake8-docstrings