-
-
Notifications
You must be signed in to change notification settings - Fork 2.9k
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
[1.14 regression] truthy check for enums #18376
Comments
Thanks, bisects to #17337 |
cc @Daverball in case you have time to take a look |
PR here #18379 |
Thanks :) |
This is specific to Case in point, the bug disappears if you use So it's not really a true regression, the old broken behavior happened to be accidentally correct for We could probably slightly improve the behavior for |
Hmm, actually |
Yup on |
Bug Report
It appears the truthy check for enums is incorrect in 1.14 when
warn_unreachable
is set to True.For example
With a
mypy.ini
If we run the script we get:
Which shows the behaviour of these enums is such that they can be used in an if condition
but running
mypy a.py
results in:Your Environment
The text was updated successfully, but these errors were encountered: