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
This prevents use of a newer version of typing_extensions with mypy because the types are always fixed at the version distributed with mypy. This is somewhat surprising and the error is very obscure.
To Reproduce
(Write your steps here:)
Install typing-extensions>=4.1.0
Add from typing_extensions import assert_never
Run mypy
Expected Behavior
mypy recognises imports of new things from newer versions of typing-extensions.
Actual Behavior
mypy complains that assert_never() doesn't exist in typing-extensions.
Your Environment
Mypy version used: 0.931
Mypy command-line flags: N/A
Mypy configuration options from mypy.ini (and other config files): pretty, strict, show-error-codes, warn-unreachable
Python version used: 3.9
Operating system and version: Linux
The text was updated successfully, but these errors were encountered:
Bug Report
I was attempt to use
assert_never()
fromtyping-extensions>=4.1.0
but I get the following when runningmypy
:I noticed that the following file exists in
typeshed/stdlib
even thoughtyping-extensions
is not part of the standard library:https://github.com/python/mypy/blob/master/mypy/typeshed/stdlib/typing_extensions.pyi
This prevents use of a newer version of typing_extensions with
mypy
because the types are always fixed at the version distributed withmypy
. This is somewhat surprising and the error is very obscure.To Reproduce
(Write your steps here:)
typing-extensions>=4.1.0
from typing_extensions import assert_never
mypy
Expected Behavior
mypy
recognises imports of new things from newer versions oftyping-extensions
.Actual Behavior
mypy
complains thatassert_never()
doesn't exist intyping-extensions
.Your Environment
mypy.ini
(and other config files):pretty, strict, show-error-codes, warn-unreachable
The text was updated successfully, but these errors were encountered: