1
1
# Stubs for builtins (Python 3)
2
2
3
3
from typing import (
4
- TypeVar , Iterator , Iterable , overload , Type ,
4
+ TypeVar , Iterator , Iterable , overload ,
5
5
Sequence , MutableSequence , Mapping , MutableMapping , Tuple , List , Any , Dict , Callable , Generic ,
6
6
Set , AbstractSet , MutableSet , Sized , Reversible , SupportsInt , SupportsFloat , SupportsBytes ,
7
7
SupportsAbs , SupportsRound , IO , Union , ItemsView , KeysView , ValuesView , ByteString , Optional
@@ -22,6 +22,7 @@ _T1 = TypeVar('_T1')
22
22
_T2 = TypeVar ('_T2' )
23
23
_T3 = TypeVar ('_T3' )
24
24
_T4 = TypeVar ('_T4' )
25
+ _TT = TypeVar ('_TT' , bound = 'type' )
25
26
26
27
class staticmethod : pass # Special, only valid as a decorator.
27
28
class classmethod : pass # Special, only valid as a decorator.
@@ -57,7 +58,7 @@ class type:
57
58
@overload
58
59
def __new__ (cls , name : str , bases : Tuple [type , ...], namespace : Dict [str , Any ]) -> type : ...
59
60
def __call__ (self , * args : Any , ** kwds : Any ) -> Any : ...
60
- def __subclasses__ (self : Type [ _T ] ) -> List [Type [ _T ] ]: ...
61
+ def __subclasses__ (self : _TT ) -> List [_TT ]: ...
61
62
# Note: the documentation doesnt specify what the return type is, the standard
62
63
# implementation seems to be returning a list.
63
64
def mro (self ) -> List [type ]: ...
0 commit comments