-
Notifications
You must be signed in to change notification settings - Fork 178
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
Spurious F811 with conditional definition #780
Comments
you've already got a I think this is working as intended |
Fair enough. I've added the noqa but personally I consider that neither of these should be needed. The You might think that putting it in the else is clearer. I'm not sure I agree but I don't feel strongly about it. Mainly what I don't want is to go round making pointless changes like that because whatever change I choose here is not going to improve anything in any meaningful way. We get a lot of value from flake8 and I like the emphasis on minimising "false positives" but that's exactly what I would call this: a false positive. |
With pyflakes 3.1.0 (but not 3.0.1) the following produces F811:
This gives:
Here A is defined conditionally with None as a default so this is not really a "redefinition".
This was previously PyCQA/flake8#1855
Possibly the cause of the change is gh-761.
The text was updated successfully, but these errors were encountered: