Open
Description
With mypy 0.600
(and the latest master eb1bb064d707ce05735ff6795df82126e75ea6ea
), running mypy on
from typing import ClassVar, Type, Generic, TypeVar
_T = TypeVar('_T')
class Array(Generic[_T]):
_length_: ClassVar[int]
_type_: ClassVar[Type[_T]]
def generate() -> Type[Array[float]]:
pass
generate()._type_(3)
fails with
test.py:12: error: Too many arguments for "object"
instead of allowing this to construct a float
.
The original use-case here is in the ctypes
stubs, where mypy fails to derive the type of (ctypes.c_float * 5)._type_
-- see: