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")
3232_KT_co = TypeVar ("_KT_co" , covariant = True )
3333_VT_co = TypeVar ("_VT_co" , covariant = True )
3434
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+
3551# namedtuple is special-cased in the type checker; the initializer is ignored.
3652def namedtuple (
3753 typename : str ,
You can’t perform that action at this time.
0 commit comments