Correct MappingProxyType for 3.8+ (#12369)

Co-authored-by: Shantanu <12621235+hauntsaninja@users.noreply.github.com>
This commit is contained in:
Max Muoto
2024-07-20 15:37:30 -05:00
committed by GitHub
parent 304b8e9626
commit 240e3d8004
3 changed files with 21 additions and 1 deletions

View File

@@ -304,6 +304,10 @@ class MappingProxyType(Mapping[_KT, _VT_co]):
def keys(self) -> KeysView[_KT]: ...
def values(self) -> ValuesView[_VT_co]: ...
def items(self) -> ItemsView[_KT, _VT_co]: ...
@overload
def get(self, key: _KT, /) -> _VT_co | None: ... # type: ignore[override]
@overload
def get(self, key: _KT, default: _VT_co | _T2, /) -> _VT_co | _T2: ... # type: ignore[override]
if sys.version_info >= (3, 9):
def __class_getitem__(cls, item: Any, /) -> GenericAlias: ...
def __reversed__(self) -> Iterator[_KT]: ...