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
I expected mypy to error because I missed checking against red
colors.py:13: error: Argument 1 to "assert_never" has incompatible type "Literal['red']"; expected "Never" [arg-type]Found 1 error in 1 file (checked 1 source file)
Actual Behavior
Mypy doesn't raise any errors
Success: no issues found in 1 source file
** Extra Context **
This only happens when I use |.
I don't use pyright but ran it to see if I was the one missing something but I believe they do flag it correctly
colors.py:13:24 - error: Argument of type "Literal['red']" cannot be assigned to parameter "arg" of type "Never" in function "assert_never" Type "Literal['red']" is not assignable to type "Never" (reportArgumentType)
Your Environment
Mypy version used: mypy 1.13.0 (compiled: yes)
Mypy command-line flags: --strict
Python version used: Python 3.11.6
The text was updated successfully, but these errors were encountered:
Bug Report
Mypy fails to identify missing value comparisons in my
match
when I use|
To Reproduce
Gist URL
Playground URL
Expected Behavior
I expected mypy to error because I missed checking against
red
Actual Behavior
Mypy doesn't raise any errors
Success: no issues found in 1 source file
** Extra Context **
This only happens when I use
|
.I don't use pyright but ran it to see if I was the one missing something but I believe they do flag it correctly
Your Environment
mypy 1.13.0 (compiled: yes)
--strict
Python 3.11.6
The text was updated successfully, but these errors were encountered: