File tree Expand file tree Collapse file tree 1 file changed +16
-0
lines changed
mypy/typeshed/stdlib/collections Expand file tree Collapse file tree 1 file changed +16
-0
lines changed Original file line number Diff line number Diff line change @@ -32,6 +32,22 @@ _VT = TypeVar("_VT")
32
32
_KT_co = TypeVar ("_KT_co" , covariant = True )
33
33
_VT_co = TypeVar ("_VT_co" , covariant = True )
34
34
35
+ # at runtime this class is implemented in _collections, but it considers itself to live in collections since Python 3.12
36
+ @final
37
+ class _tuplegetter (Generic [_T ]): # undocumented
38
+ def __init__ (self , index : SupportsIndex , doc : str , / ) -> None : ...
39
+ def __reduce__ (self ) -> tuple [type [Self ], tuple [int , str ]]: ...
40
+ if sys .version_info >= (3 , 10 ):
41
+ @overload
42
+ def __get__ (self , instance : None , owner : type [Any ] | None = None , / ) -> Self : ...
43
+ @overload
44
+ def __get__ (self , instance : object , owner : type [Any ] | None = None , / ) -> _T : ...
45
+ else :
46
+ @overload
47
+ def __get__ (self , instance : None , owner : type [Any ] | None , / ) -> Self : ...
48
+ @overload
49
+ def __get__ (self , instance : object , owner : type [Any ] | None , / ) -> _T : ...
50
+
35
51
# namedtuple is special-cased in the type checker; the initializer is ignored.
36
52
def namedtuple (
37
53
typename : str ,
You can’t perform that action at this time.
0 commit comments