Skip to content

Commit

Permalink
Widen MutableMapping.update type
Browse files Browse the repository at this point in the history
Part of #6056
  • Loading branch information
JelleZijlstra authored Dec 22, 2021
1 parent 0095536 commit 26aa303
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion stdlib/typing.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ import sys
from abc import ABCMeta, abstractmethod
from types import BuiltinFunctionType, CodeType, FrameType, FunctionType, MethodType, ModuleType, TracebackType
from typing_extensions import Literal as _Literal, ParamSpec as _ParamSpec, final as _final
from _typeshed import SupportsKeysAndGetItem

if sys.version_info >= (3, 7):
from types import MethodDescriptorType, MethodWrapperType, WrapperDescriptorType
Expand Down Expand Up @@ -488,7 +489,7 @@ class MutableMapping(Mapping[_KT, _VT], Generic[_KT, _VT]):
# known to be a Mapping with unknown type parameters, which is closer
# to the behavior we want. See mypy issue #1430.
@overload
def update(self, __m: Mapping[_KT, _VT], **kwargs: _VT) -> None: ...
def update(self, __m: SupportsKeysAndGetItem[_KT, _VT], **kwargs: _VT) -> None: ...
@overload
def update(self, __m: Iterable[tuple[_KT, _VT]], **kwargs: _VT) -> None: ...
@overload
Expand Down

0 comments on commit 26aa303

Please sign in to comment.