-
Notifications
You must be signed in to change notification settings - Fork 105
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
B031 does not take into account if-else statements #465
Labels
Comments
On a related note, I am also getting false positive for code that only type-annotates the iterable. It iterates only once, but B031 is triggered:
|
Thanks for reporting. Both are things we could tighten. PRs welcome. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Bugbear reports false-positive "more that one" usage of the generator even if it occurs inside 2 different branches of the if-else statement.
This code
produces
but it's obvious that
group
cannot be used twice here.flake8 --version:
The text was updated successfully, but these errors were encountered: