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