python / mypy

Optional static typing for Python
https://www.mypy-lang.org/
Other
18.56k stars 2.84k forks source link

Fix `OR` pattern structural matching exhaustiveness #18119

Closed shenyih0ng closed 2 weeks ago

shenyih0ng commented 2 weeks ago

Fixes #18108

This PR fixes the issue of missing value comparisons in a MatchStmt due to OrPattern incorrectly narrowing down the type of the subject.

github-actions[bot] commented 2 weeks ago

According to mypy_primer, this change doesn't affect type check results on a corpus of open source code. ✅

github-actions[bot] commented 2 weeks ago

According to mypy_primer, this change doesn't affect type check results on a corpus of open source code. ✅

github-actions[bot] commented 2 weeks ago

According to mypy_primer, this change doesn't affect type check results on a corpus of open source code. ✅