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
numpy dtype Statement is unreachable with mypy 1.19.0 #20358
Bug Report
When checking the type field of a dtype with match, mypy 1.19.0 complains sbout some cases with error: Statement is unreachable.
It doesn't look like a numpy bug because swapping the order of the cases (eg. moving the int32 case to the top) it produces inconsistent results (eg. it generates 1 error instead of 2).
Activity
sterliakov commentedon Dec 3, 2025
#20146 should fix this. This is a logic bug in how
mypytreatsmatch-casearms with value patterns.Do not treat `match` value patterns as `isinstance` checks (python#20146