-
Notifications
You must be signed in to change notification settings - Fork 3.5k
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
Move flake8 to ci_lint #8652
Move flake8 to ci_lint #8652
Conversation
This fixes the scenario where you lint with ci_lint but it can still fail in PR due to flake8 being injected only into the Mac build.
Interesting. I didn't realize that Mac build uses flake8 in addition to pylint. The flake8 was introduced by #4688 but only in the Github action. I'm wondering if the flake8 rules being tested (i.e., E9,F63,F7) have the corresponding one in pylint, so that we only need to change the pylintrc? Also cc @tqchen |
@comaniac, that's a good thought actually, we run only a reduced set of of flake8 options. Looking at the errors enabled:
|
Thanks for the investigation! Looks like @cclauss would you please advise as well? |
https://flake8.pycqa.org/en/latest/user/error-codes.html On the flake8 test selection, this PR should not focus on "style violations" (the majority of flake8 error codes that psf/black can autocorrect). Instead, these tests should focus on runtime safety and correctness:
|
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 @Mousius i think this does make sense. i sort of think ci-lint should be the one source of lint, rather than the mac build, because dependencies may differ between the two installations. will leave the PR unsubmitted til tomorrow to allow the other reviewers to comment.
My only concern is if there is guarantee that flake8 and pylint won't conflict. Happy to merge it in if it is not the case |
Conflict should not be a problem… This repo currently has 574 instances of flake8 F821 undefined name. |
Thanks for the PR @cclauss! Thanks @areusch @comaniac @electriclilies for the discussion! |
* Move flake8 to ci_lint This fixes the scenario where you lint with ci_lint but it can still fail in PR due to flake8 being injected only into the Mac build. * Disable flake8 until the docker changes have landed
Saw apache#9055 adds `flake8.sh` to the `docker/lint.sh` and remembered I started doing this in apache#8652, but never updated it after the Docker images were actually updated.
Saw apache#9055 adds `flake8.sh` to the `docker/lint.sh` and remembered I started doing this in apache#8652, but never updated it after the Docker images were actually updated.
* Move flake8 to ci_lint This fixes the scenario where you lint with ci_lint but it can still fail in PR due to flake8 being injected only into the Mac build. * Disable flake8 until the docker changes have landed
Saw apache#9055 adds `flake8.sh` to the `docker/lint.sh` and remembered I started doing this in apache#8652, but never updated it after the Docker images were actually updated.
* Move flake8 to ci_lint This fixes the scenario where you lint with ci_lint but it can still fail in PR due to flake8 being injected only into the Mac build. * Disable flake8 until the docker changes have landed
Saw apache#9055 adds `flake8.sh` to the `docker/lint.sh` and remembered I started doing this in apache#8652, but never updated it after the Docker images were actually updated.
This fixes the scenario where you lint with ci_lint but it can still
fail in PR due to flake8 being injected only into the Mac build.