Correct MappingProxyType for 3.8+ (#12369)

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

No files matched your search

+4
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]: ...