-
Notifications
You must be signed in to change notification settings - Fork 3k
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 "src/pip" to respect flake8-bugbear #8405
Conversation
47a975f
to
f220b9d
Compare
f220b9d
to
1f31740
Compare
I think this should be ready for merged, and should close out the integration of the first flake8 plugin with Do I also need to make an issue to remove the |
Hi @pradyunsg I observed that the CI broke in the latest merge to master: https://github.com/pypa/pip/runs/744912102 because the PR #8398 which was merged, we were specifically checking for a set number of error codes: Line 30 in 19e739c
which was not included in that PR ( There might be similar situations which might happen for the other active PRs, once we enable What would be the right course of action then to avoid such situations from happening again? One way I think of solving this is to instruct on the active PRs about this change, and ask them to merge/rebase from master after this PR gets merged, and fix potential I am open to any other suggestions on how to avoid this situation for the other open PRs in future as well, until new PRs emerge with flake8-bugbear baked in pip entirely. |
@deveshks @pradyunsg this kind of annoyance can happen when merging PRs that are not up-to-date with but that is extremely cumbersone (requiring a rebase before any merge, waiting for CI, etc). A option that I like and use in other projects is to use a bot for merging. The bot can then check if all conditions for merging are satisfied, including a green CI after merging in |
I agree that having such an off-the-shelf bot would require quite a bit of research to find, which satisfies both the current merge requirements, as well as is open to future requirement additions. A cursory search came up with https://github.com/palantir/bulldozer which on first glance looks good. |
bors is the right tool if we want to do "make sure master doesn't break" with automation IMO -- I don't think we hit this issue often enough right now to introduce a new workflow, but if folks reckon we should do this, please file a new issue and @-mention me. :) |
@sbidoul For now, I think we should merge this PR, and then fix whatever failures are left in a follow up. :) |
I agree as well, but the failures might come up every time when an existing PR which might not have a For the current PR which was merged, which failed at pip/src/pip/_internal/cli/cmdoptions.py Line 838 in 19e739c
we can either add a |
That's gonna be true for any new linter we add. 🤷🏻♂️ I don't think we'd hit this a lot (most of the ~80 PRs we have open either need to be closed or updated), so I'm not too worried. If anyone disagrees / wants us to actively deal with this stuff properly, please file an issue for dedicated discussion on this (as I mentioned above). |
Yes I agree that any new linter addition will affect only a few PRs, which can be taken care of easily. I think I was being overly cautious in my earlier statements. |
Created #8408 to remove |
ca71953
to
8f1d808
Compare
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.
This should be good to go when green.
Thanks, It's green now 😊 |
Towards #5537 (Follow-up of #8398)
This should finish adding of
flake8-bugbear
to pip, apart from some ignores which can be removed once Python2 support is dropped.