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
Thank you for reporting! I dont think this is a new bug/feature request. We already have a proposal to infer Union across an if ... else ... (see #2611) so I am closing this issue.
mypy 0.521
Let's take this snippet. This one is perfectly fine and
mypy
doesn't complainNow, let's add another branch:
This triggers an error:
It shouldn't, since the variable is not used outside the
if...elif...else
The text was updated successfully, but these errors were encountered: