@@ -63,6 +63,7 @@ if sys.version_info >= (3, 13):
63
63
_T1 = TypeVar ("_T1" )
64
64
_T2 = TypeVar ("_T2" )
65
65
_KT = TypeVar ("_KT" )
66
+ _KT_co = TypeVar ("_KT_co" , covariant = True )
66
67
_VT_co = TypeVar ("_VT_co" , covariant = True )
67
68
68
69
# Make sure this class definition stays roughly in line with `builtins.function`
@@ -302,25 +303,25 @@ class CodeType:
302
303
__replace__ = replace
303
304
304
305
@final
305
- class MappingProxyType (Mapping [_KT , _VT_co ]):
306
+ class MappingProxyType (Mapping [_KT_co , _VT_co ]): # type: ignore[type-var]
306
307
__hash__ : ClassVar [None ] # type: ignore[assignment]
307
- def __new__ (cls , mapping : SupportsKeysAndGetItem [_KT , _VT_co ]) -> Self : ...
308
- def __getitem__ (self , key : _KT , / ) -> _VT_co : ...
309
- def __iter__ (self ) -> Iterator [_KT ]: ...
308
+ def __new__ (cls , mapping : SupportsKeysAndGetItem [_KT_co , _VT_co ]) -> Self : ...
309
+ def __getitem__ (self , key : _KT_co , / ) -> _VT_co : ... # type: ignore[misc]
310
+ def __iter__ (self ) -> Iterator [_KT_co ]: ...
310
311
def __len__ (self ) -> int : ...
311
312
def __eq__ (self , value : object , / ) -> bool : ...
312
- def copy (self ) -> dict [_KT , _VT_co ]: ...
313
- def keys (self ) -> KeysView [_KT ]: ...
313
+ def copy (self ) -> dict [_KT_co , _VT_co ]: ...
314
+ def keys (self ) -> KeysView [_KT_co ]: ...
314
315
def values (self ) -> ValuesView [_VT_co ]: ...
315
- def items (self ) -> ItemsView [_KT , _VT_co ]: ...
316
+ def items (self ) -> ItemsView [_KT_co , _VT_co ]: ...
316
317
@overload
317
- def get (self , key : _KT , / ) -> _VT_co | None : ...
318
+ def get (self , key : _KT_co , / ) -> _VT_co | None : ... # type: ignore[misc]
318
319
@overload
319
- def get (self , key : _KT , default : _VT_co | _T2 , / ) -> _VT_co | _T2 : ...
320
+ def get (self , key : _KT_co , default : _VT_co | _T2 , / ) -> _VT_co | _T2 : ... # type: ignore[misc]
320
321
def __class_getitem__ (cls , item : Any , / ) -> GenericAlias : ...
321
- def __reversed__ (self ) -> Iterator [_KT ]: ...
322
- def __or__ (self , value : Mapping [_T1 , _T2 ], / ) -> dict [_KT | _T1 , _VT_co | _T2 ]: ...
323
- def __ror__ (self , value : Mapping [_T1 , _T2 ], / ) -> dict [_KT | _T1 , _VT_co | _T2 ]: ...
322
+ def __reversed__ (self ) -> Iterator [_KT_co ]: ...
323
+ def __or__ (self , value : Mapping [_T1 , _T2 ], / ) -> dict [_KT_co | _T1 , _VT_co | _T2 ]: ...
324
+ def __ror__ (self , value : Mapping [_T1 , _T2 ], / ) -> dict [_KT_co | _T1 , _VT_co | _T2 ]: ...
324
325
325
326
class SimpleNamespace :
326
327
__hash__ : ClassVar [None ] # type: ignore[assignment]
0 commit comments