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
Improve flake8 checks #1132
Improve flake8 checks #1132
Conversation
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.
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.
I'm also working on getting black. As you noticed, this single quote thing will get in the way anyway. |
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
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