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
type not generic when running with Python < 3.9 #10303
When checking it with mypy 0.820+dev.1e96f1df48a6e06ba598fa8230b96671b206cba0 and Python 3.9.4, it passes. Using Python 3.8.9 on the other hand, produces the following output:
foo.pyi:2: error: "type" expects no type arguments, but 1 given
It's weird that generic dict works, but generic type doesn't. (Although I'd expect both to work with any Python version.)
Activity
Fixes to generic builtin types (#10766)
srittau commentedon Dec 22, 2021
@JukkaL This doesn't seem to fixed in mypy 0.930:
(I tested it with both Python 3.9.6 and 3.6.14.)
AlexWaygood commentedon Dec 28, 2021
Interestingly, it appears to be fixed for
.pyfiles, but not for.pyifiles. This, in a.pyfile, will pass using Python 3.7:But this, in a
.pyifile, fails using Python <= 3.8:Many similar errors can be found in the CI output for python/typeshed#6681.
AlexWaygood commentedon Dec 28, 2021
Cc. @sobolevn
sobolevn commentedon Dec 29, 2021
Sorry, I cannot not reopen issues, but here's my PR: #11863
hauntsaninja commentedon Jan 6, 2022
Thanks to sobolevn this should be fixed for pyi with old Pythons!