-
Notifications
You must be signed in to change notification settings - Fork 0
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 ignore=E203 to flake8 #183
Conversation
This looks good to me but, for future reference, can you provide a link to where this is called out as a "known discrepancy"? |
Please also provide more details on why W=503 was added (you can just include the explanation you provided on Slack) |
The W503 warning is raised by flake8 when it detects a line break before a binary operator. This was once against PEP 8 recommendations, which suggested that line breaks should occur after the binary operator. |
The E203 error was discussed in a bunch of issues. Below are two of them: And the W503 error was discussed here: |
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.
Thanks for the additional information. This change looks good to me.
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.
Looks good! Please update with dev and I'll merge.
Issue Score: Excellent Comments: |
The line "ignore = E203" is added to the setup.cfg file such that the conflict between flake8 and black can be resolved. The error is raised by flake8 when it detects whitespace before ':' which is against PEP 8 style guide recommendations for slices.
However, there's a known discrepancy between flake8 and black regarding this specific rule. black formats code with whitespace before and after the colon in slices for better readability, while flake8 raises a warning for this.