diff --git a/stdlib/@tests/stubtest_allowlists/common.txt b/stdlib/@tests/stubtest_allowlists/common.txt index 130c6d2b8285..89fff2aacd8c 100644 --- a/stdlib/@tests/stubtest_allowlists/common.txt +++ b/stdlib/@tests/stubtest_allowlists/common.txt @@ -184,7 +184,6 @@ _collections_abc.AsyncGenerator.aclose _collections_abc.AsyncIterator.__anext__ _collections_abc.Callable # Typing-related weirdness -_collections_abc.Mapping.get # Adding None to the Union messed up mypy _collections_abc.Sequence.index # Supporting None in end is not mandatory _ctypes.CFuncPtr # stubtest erroneously thinks it can't be subclassed diff --git a/stdlib/@tests/stubtest_allowlists/py39.txt b/stdlib/@tests/stubtest_allowlists/py39.txt index 37c1ec2ad171..db681ff7835e 100644 --- a/stdlib/@tests/stubtest_allowlists/py39.txt +++ b/stdlib/@tests/stubtest_allowlists/py39.txt @@ -20,7 +20,6 @@ collections.AsyncGenerator.asend # async at runtime, deliberately not in the st collections.AsyncIterator.__anext__ # async at runtime, deliberately not in the stub, see #7491 collections.ByteString # see comments in py3_common.txt collections.Callable -collections.Mapping.get # Adding None to the Union messed up mypy collections.Sequence.index # Supporting None in end is not mandatory # =========== diff --git a/stdlib/typing.pyi b/stdlib/typing.pyi index 79ab9eee924f..84fced377312 100644 --- a/stdlib/typing.pyi +++ b/stdlib/typing.pyi @@ -746,7 +746,7 @@ class Mapping(Collection[_KT], Generic[_KT, _VT_co]): @overload def get(self, key: _KT, /) -> _VT_co | None: ... @overload - def get(self, key: _KT, /, default: _VT_co | _T) -> _VT_co | _T: ... + def get(self, key: _KT, /, default: _T) -> _VT_co | _T: ... def items(self) -> ItemsView[_KT, _VT_co]: ... def keys(self) -> KeysView[_KT]: ... def values(self) -> ValuesView[_VT_co]: ...