You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When comparing a member of StrEnum to a string, it seems that Mypy assumes that the check is always False and does not type-check code under the condition.
Bug Report
When comparing a member of StrEnum to a string, it seems that Mypy assumes that the check is always False and does not type-check code under the condition.
To Reproduce
https://mypy-play.net/?mypy=latest&python=3.12&gist=f7c8364d301ada4067a9a6f515b9e161
Expected Behavior
Mypy should flag both
1 + ''
expressions as type errors because these conditions evaluate toTrue
in runtime.Actual Behavior
Mypy does not report errors
Your Environment
mypy.ini
(and other config files): noneThe text was updated successfully, but these errors were encountered: