Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 14 additions & 14 deletions stdlib/types.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ if sys.version_info >= (3, 13):

_T1 = TypeVar("_T1")
_T2 = TypeVar("_T2")
_KT = TypeVar("_KT")
_KT_co = TypeVar("_KT_co", covariant=True)
_VT_co = TypeVar("_VT_co", covariant=True)

# Make sure this class definition stays roughly in line with `builtins.function`
Expand Down Expand Up @@ -309,27 +309,27 @@ class CodeType:
__replace__ = replace

@final
class MappingProxyType(Mapping[_KT, _VT_co]):
class MappingProxyType(Mapping[_KT_co, _VT_co]): # type: ignore[type-var] # pyright: ignore[reportInvalidTypeArguments]
__hash__: ClassVar[None] # type: ignore[assignment]
def __new__(cls, mapping: SupportsKeysAndGetItem[_KT, _VT_co]) -> Self: ...
def __getitem__(self, key: _KT, /) -> _VT_co: ...
def __iter__(self) -> Iterator[_KT]: ...
def __new__(cls, mapping: SupportsKeysAndGetItem[_KT_co, _VT_co]) -> Self: ...
def __getitem__(self, key: _KT_co, /) -> _VT_co: ... # type: ignore[misc] # pyright: ignore[reportGeneralTypeIssues]
def __iter__(self) -> Iterator[_KT_co]: ...
def __len__(self) -> int: ...
def __eq__(self, value: object, /) -> bool: ...
def copy(self) -> dict[_KT, _VT_co]: ...
def keys(self) -> KeysView[_KT]: ...
def copy(self) -> dict[_KT_co, _VT_co]: ...
def keys(self) -> KeysView[_KT_co]: ...
def values(self) -> ValuesView[_VT_co]: ...
def items(self) -> ItemsView[_KT, _VT_co]: ...
def items(self) -> ItemsView[_KT_co, _VT_co]: ...
@overload
def get(self, key: _KT, /) -> _VT_co | None: ...
def get(self, key: _KT_co, /) -> _VT_co | None: ... # type: ignore[misc] # pyright: ignore[reportGeneralTypeIssues] # Covariant type as parameter
@overload
def get(self, key: _KT, default: _VT_co, /) -> _VT_co: ... # type: ignore[misc] # pyright: ignore[reportGeneralTypeIssues] # Covariant type as parameter
def get(self, key: _KT_co, default: _VT_co, /) -> _VT_co: ... # type: ignore[misc] # pyright: ignore[reportGeneralTypeIssues] # Covariant type as parameter
@overload
def get(self, key: _KT, default: _T2, /) -> _VT_co | _T2: ...
def get(self, key: _KT_co, default: _T2, /) -> _VT_co | _T2: ... # type: ignore[misc] # pyright: ignore[reportGeneralTypeIssues] # Covariant type as parameter
def __class_getitem__(cls, item: Any, /) -> GenericAlias: ...
def __reversed__(self) -> Iterator[_KT]: ...
def __or__(self, value: Mapping[_T1, _T2], /) -> dict[_KT | _T1, _VT_co | _T2]: ...
def __ror__(self, value: Mapping[_T1, _T2], /) -> dict[_KT | _T1, _VT_co | _T2]: ...
def __reversed__(self) -> Iterator[_KT_co]: ...
def __or__(self, value: Mapping[_T1, _T2], /) -> dict[_KT_co | _T1, _VT_co | _T2]: ...
def __ror__(self, value: Mapping[_T1, _T2], /) -> dict[_KT_co | _T1, _VT_co | _T2]: ...

class SimpleNamespace:
__hash__: ClassVar[None] # type: ignore[assignment]
Expand Down
Loading