mirror of
https://github.com/davidhalter/typeshed.git
synced 2026-05-04 20:45:49 +08:00
Loosen Mapping.update() overloads a little (#14593)
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
from _typeshed import SupportsKeysAndGetItem
|
||||
from _typeshed import SupportsGetItem, SupportsKeysAndGetItem
|
||||
from _typeshed.wsgi import WSGIEnvironment
|
||||
from collections.abc import Collection, Iterable, Iterator, MutableMapping
|
||||
from typing import Literal, Protocol, TypeVar, overload, type_check_only
|
||||
@@ -73,11 +73,11 @@ class MultiDict(MutableMapping[_KT, _VT]):
|
||||
def pop(self, key: _KT, default: _T) -> _VT | _T: ...
|
||||
def popitem(self) -> tuple[_KT, _VT]: ...
|
||||
@overload # type: ignore[override]
|
||||
def update(self: MultiDict[str, _VT], **kwargs: _VT) -> None: ...
|
||||
def update(self: SupportsGetItem[str, _VT], **kwargs: _VT) -> None: ...
|
||||
@overload
|
||||
def update(self, m: Collection[tuple[_KT, _VT]], /) -> None: ...
|
||||
@overload
|
||||
def update(self: MultiDict[str, _VT], m: Collection[tuple[str, _VT]], /, **kwargs: _VT) -> None: ...
|
||||
def update(self: SupportsGetItem[str, _VT], m: Collection[tuple[str, _VT]], /, **kwargs: _VT) -> None: ...
|
||||
@overload
|
||||
def extend(self, other: _SupportsItemsWithIterableResult[_KT, _VT]) -> None: ...
|
||||
@overload
|
||||
|
||||
Reference in New Issue
Block a user