Repro:
from typing import TypeVar, Tuple, Type
T = TypeVar('T', bound='Friend')
class Friend:
other = None # type: Friend
@classmethod
def make(cls: Type[T]) -> T:
return cls()
class SuperFriend(Friend):
pass
reveal_type(SuperFriend.make()) # Revealed type is 'test_generic_self.SuperFriend*'
reveal_type(SuperFriend().make()) # Revealed type is '<nothing>'
Both invocations should return test_generic_self.SuperFriend*.