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
{{ message }}
Repository navigation
possibly-undefined false positive when assigning variable for every case in match statement for all possible values #16992
Activity
Andrej730 commentedon Jun 27, 2024
Interesting that adding
case _kind of resolves the issue though mypy does detect thatcase _code is unreachable.I've also met the similar issue with
if isinstancechecks. In the last case adding redudantelseblock makes the case false negative.fix(web_protocol): ignore false positive on possibly undefined
tamird commentedon May 1, 2026
Another simple case that demonstrates the inconsistency with unreachable code:
playground