mirror of
https://github.com/davidhalter/typeshed.git
synced 2026-01-02 01:23:24 +08:00
Improve the accuracy of (default)dict.__(r)or__ (#10679)
This commit is contained in:
@@ -402,13 +402,13 @@ class defaultdict(dict[_KT, _VT], Generic[_KT, _VT]):
|
||||
def copy(self) -> Self: ...
|
||||
if sys.version_info >= (3, 9):
|
||||
@overload
|
||||
def __or__(self, __value: Mapping[_KT, _VT]) -> Self: ...
|
||||
def __or__(self, __value: dict[_KT, _VT]) -> Self: ...
|
||||
@overload
|
||||
def __or__(self, __value: Mapping[_T1, _T2]) -> defaultdict[_KT | _T1, _VT | _T2]: ...
|
||||
def __or__(self, __value: dict[_T1, _T2]) -> defaultdict[_KT | _T1, _VT | _T2]: ...
|
||||
@overload
|
||||
def __ror__(self, __value: Mapping[_KT, _VT]) -> Self: ...
|
||||
def __ror__(self, __value: dict[_KT, _VT]) -> Self: ...
|
||||
@overload
|
||||
def __ror__(self, __value: Mapping[_T1, _T2]) -> defaultdict[_KT | _T1, _VT | _T2]: ...
|
||||
def __ror__(self, __value: dict[_T1, _T2]) -> defaultdict[_KT | _T1, _VT | _T2]: ... # type: ignore[misc]
|
||||
|
||||
class ChainMap(MutableMapping[_KT, _VT], Generic[_KT, _VT]):
|
||||
maps: list[MutableMapping[_KT, _VT]]
|
||||
|
||||
Reference in New Issue
Block a user