mirror of
https://github.com/davidhalter/typeshed.git
synced 2026-07-09 09:59:16 +08:00
Loosen Mapping.update() overloads a little (#14593)
This commit is contained in:
+4
-4
@@ -5,7 +5,7 @@ import collections # noqa: F401 # pyright: ignore[reportUnusedImport]
|
||||
import sys
|
||||
import typing_extensions
|
||||
from _collections_abc import dict_items, dict_keys, dict_values
|
||||
from _typeshed import IdentityFunction, ReadableBuffer, SupportsGetItemViewable, SupportsKeysAndGetItem, Viewable
|
||||
from _typeshed import IdentityFunction, ReadableBuffer, SupportsGetItem, SupportsGetItemViewable, SupportsKeysAndGetItem, Viewable
|
||||
from abc import ABCMeta, abstractmethod
|
||||
from re import Match as Match, Pattern as Pattern
|
||||
from types import (
|
||||
@@ -801,13 +801,13 @@ class MutableMapping(Mapping[_KT, _VT]):
|
||||
@overload
|
||||
def update(self, m: SupportsKeysAndGetItem[_KT, _VT], /) -> None: ...
|
||||
@overload
|
||||
def update(self: Mapping[str, _VT], m: SupportsKeysAndGetItem[str, _VT], /, **kwargs: _VT) -> None: ...
|
||||
def update(self: SupportsGetItem[str, _VT], m: SupportsKeysAndGetItem[str, _VT], /, **kwargs: _VT) -> None: ...
|
||||
@overload
|
||||
def update(self, m: Iterable[tuple[_KT, _VT]], /) -> None: ...
|
||||
@overload
|
||||
def update(self: Mapping[str, _VT], m: Iterable[tuple[str, _VT]], /, **kwargs: _VT) -> None: ...
|
||||
def update(self: SupportsGetItem[str, _VT], m: Iterable[tuple[str, _VT]], /, **kwargs: _VT) -> None: ...
|
||||
@overload
|
||||
def update(self: Mapping[str, _VT], **kwargs: _VT) -> None: ...
|
||||
def update(self: SupportsGetItem[str, _VT], **kwargs: _VT) -> None: ...
|
||||
|
||||
Text = str
|
||||
|
||||
|
||||
Reference in New Issue
Block a user