11# Stubs for builtins (Python 3)
22
33from typing import (
4- TypeVar , Iterator , Iterable , overload , Type ,
4+ TypeVar , Iterator , Iterable , overload ,
55 Sequence , MutableSequence , Mapping , MutableMapping , Tuple , List , Any , Dict , Callable , Generic ,
66 Set , AbstractSet , MutableSet , Sized , Reversible , SupportsInt , SupportsFloat , SupportsBytes ,
77 SupportsAbs , SupportsRound , IO , Union , ItemsView , KeysView , ValuesView , ByteString , Optional
@@ -22,6 +22,7 @@ _T1 = TypeVar('_T1')
2222_T2 = TypeVar ('_T2' )
2323_T3 = TypeVar ('_T3' )
2424_T4 = TypeVar ('_T4' )
25+ _TT = TypeVar ('_TT' , bound = 'type' )
2526
2627class staticmethod : pass # Special, only valid as a decorator.
2728class classmethod : pass # Special, only valid as a decorator.
@@ -57,7 +58,7 @@ class type:
5758 @overload
5859 def __new__ (cls , name : str , bases : Tuple [type , ...], namespace : Dict [str , Any ]) -> type : ...
5960 def __call__ (self , * args : Any , ** kwds : Any ) -> Any : ...
60- def __subclasses__ (self : Type [ _T ] ) -> List [Type [ _T ] ]: ...
61+ def __subclasses__ (self : _TT ) -> List [_TT ]: ...
6162 # Note: the documentation doesnt specify what the return type is, the standard
6263 # implementation seems to be returning a list.
6364 def mro (self ) -> List [type ]: ...
0 commit comments