typing_extensions.NewType
annotations are not recognized on < 3.10 (regression in 1.4.0)
#16297
Labels
typing_extensions.NewType
annotations are not recognized on < 3.10 (regression in 1.4.0)
#16297
Bug Report
Mypy 1.4.0 introduced a regression where
typing_extensions.NewType
annotations are not correctly recognized when--python-version
< 3.10.this bisects to python/typeshed@a6d0aaf via python/typeshed#10205 via #15334. however this does not appear to be a typeshed issue; it's just that the typeshed change exposed a previously-hidden Mypy issue.
To Reproduce
Expected Behavior
Mypy passes this example.
Actual Behavior
Mypy fails this example; see above.
Your Environment
--python-version=3.9
mypy.ini
(and other config files): none (i.e. using vendored typeshed)The text was updated successfully, but these errors were encountered: