Closed
Description
Example:
from typing import Sequence, List, Type
class A(object):
pass
class B(A):
pass
class C(A):
pass
subs_1 = A.__subclasses__() # type: Sequence[Type[A]]
subs_2 = [t for t in A.__subclasses__() if issubclass(t, A)] # type: List[Type[A]]
Expected behavior
The inferred types for subs_1
and subs_2
are as annotated
Actual behavior
The inferred type is List[type]
for both subs_1
and subs_2
.