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
Issue #1942 remove linting error ignores #1964
Issue #1942 remove linting error ignores #1964
Conversation
…ection of tox.ini start to add spaces around operators where errors are raised by tox/flake8
…ised by tox/flake8
Hello @pipermerriam , @carver , @cburgdorf , @gsalgado , I'm not sure who I should ask for a review so I picked up the top 4 contributors ! 😅 😄 Would it be possible to have this PR reviewed ? 🙏 |
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.
Yup, looks great, thanks for the contribution!
Would you mind stripping out the W503 also? While you're working on that, it seems that the two commits can be squashed too. But if you prefer, I'm happy to squash-merge it for you after the W503 change.
tox.ini
Outdated
@@ -10,9 +10,6 @@ envlist= | |||
max-line-length= 100 | |||
exclude= | |||
ignore = | |||
# E252 missing whitespace around parameter equals | |||
# Already used too much in the codebase at the point of introduction. | |||
E252, | |||
# W503 line break before binary operator | |||
# It's either this or W504 (line break _after_ binary operator), pick your poison. | |||
# W503 gets enabled when E252 gets ignored, see: |
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.
W503 was only here because of E252, so we can actually delete the W503 ignore now, also.
@carver thanks for the review ! :-)
Actually I tried it but I'm not sure that's possible because when I comment out this flag: |
Interesting! I wonder if the commented out lines look to flake8 like an empty list that overrides the default list, which causes the same problem as adding E252. Anyway, no need to hunt that down right now. I'll just squash-merge unless you prefer to squash it yourself. |
Yep, I agree the behaviour seems weird ...
That's all good to me if you do it, thanks ! :-) |
Shall I remove the |
Hm, seems like that confusing error will just come back the next time someone wants to include an exception. |
Maybe change the comment like: - W503 gets enabled when E252 gets ignored, see:
+ W503 gets enabled when any "ignore =" config is added (even the empty one), see: and then I'll squash-merge. |
Change is done |
What was wrong?
PR #1940 added the flake8 error code E252 to be ignored, which was a temporary solution to wait until all these errors were fixed in the codebase.
How was it fixed?
To-Do
Cute Animal Picture