Bug Report
Please consider the following stub file:
x: dict[str, str]
y: type[str]
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.)
This came up during python/typeshed#5192.
Bug Report
Please consider the following stub file:
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:
It's weird that generic
dictworks, but generictypedoesn't. (Although I'd expect both to work with any Python version.)This came up during python/typeshed#5192.