Skip to content

Commit 955432e

Browse files
allow object in Mapping.get
1 parent d7595e2 commit 955432e

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

stdlib/typing.pyi

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -777,11 +777,11 @@ class Mapping(Collection[_KT], Generic[_KT, _VT_co]):
777777
def __getitem__(self, key: _KT, /) -> _VT_co: ...
778778
# Mixin methods
779779
@overload
780-
def get(self, key: _KT, /) -> _VT_co | None: ...
780+
def get(self, key: object, /) -> _VT_co | None: ...
781781
@overload
782-
def get(self, key: _KT, default: _VT_co, /) -> _VT_co: ... # type: ignore[misc] # pyright: ignore[reportGeneralTypeIssues] # Covariant type as parameter
782+
def get(self, key: object, default: _VT_co, /) -> _VT_co: ... # type: ignore[misc] # pyright: ignore[reportGeneralTypeIssues] # Covariant type as parameter
783783
@overload
784-
def get(self, key: _KT, default: _T, /) -> _VT_co | _T: ...
784+
def get(self, key: object, default: _T, /) -> _VT_co | _T: ...
785785
def items(self) -> ItemsView[_KT, _VT_co]: ...
786786
def keys(self) -> KeysView[_KT]: ...
787787
def values(self) -> ValuesView[_VT_co]: ...

0 commit comments

Comments
 (0)