Running mypy master on this file:
fromtypingimportTypeVar, List_T=TypeVar('_T')
classX:
@propertydef__members__(self: _T) ->List[_T]: ...
reveal_type(X().__members__)gives
../bin/selftypeproperty.py:8: error: Revealed type is 'builtins.list[selftypeproperty.X*]'
../bin/selftypeproperty.py:8: error: Invalid method type
The revealed type is correct but the "Invalid method type" doesn't make sense.
Running mypy master on this file:
gives
The revealed type is correct but the "Invalid method type" doesn't make sense.