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
[FIX] Flake8 latest release raises error and includes backwards incompatilble change #3420
Conversation
👋 @ymzayek Thanks for creating a PR! Until this PR is ready for review, you can include the [WIP] tag in its title, or leave it as a github draft. Please make sure it is compliant with our contributing guidelines. In particular, be sure it checks the boxes listed below.
We will review it as quick as possible, feel free to ping us with questions if needed. |
Codecov Report
@@ Coverage Diff @@
## main #3420 +/- ##
==========================================
- Coverage 90.93% 90.72% -0.22%
==========================================
Files 133 128 -5
Lines 15399 15003 -396
Branches 3123 3074 -49
==========================================
- Hits 14003 13611 -392
+ Misses 825 822 -3
+ Partials 571 570 -1 📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more |
There is still a flake8 error due to --diff option. |
Yes, sorry I haven't had time to look into it. I will change this to a draft until it's ready. |
I changed the |
I changed the `flake8 --diff` command to what is suggested on this thread: PyCQA/flake8#1760
The problem now is that flake8 will be run on entire changed files instead of just the diff. Do we want this? If we implement automatic formatting discussed in #2528, then it won't be a problem.
I would say no, and we can revisit when automatic formatting is in place
|
Yes agreed. I will stall this then |
BTW a short term solution here can be just to use a previous version of flake8 in our PEP8 check. Any opinions on that? |
rather -1 on my side. Rather use up-to-date tools. |
# The --diff argument has been removed from flake8: | ||
# https://github.com/PyCQA/flake8/issues/1760 | ||
# Now flake8 will be run on entire files but only files that have been changed. | ||
git diff $COMMIT --name-only -z --diff-filter=d -- '*.py' | xargs -0 -r flake8 |
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.
does #3420 (comment) mean we should remove flake8 check entirely for now?
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.
We could since we cannot use it in the way we want. I just stalled it while waiting for a better solution but if the only solution will be implementing automatic formatting then we won't need this I guess
Closing this since it's superseded by #3484 |
Closes #3431. Flake8 just released a new version that raises a PEP8 failure in our CI check. Also the --diff option is now removed so we have to handle differently how we pipe changes for flake8 to check.
See: https://flake8.pycqa.org/en/latest/release-notes/6.0.0.html#backwards-incompatible-changes