Allow merging dicts of different types (#5520)

This commit is contained in:
Sebastian Speitel
2021-06-16 15:03:15 +02:00
committed by GitHub
parent 725b5ef71b
commit 04d81a8499

View File

@@ -826,9 +826,9 @@ class dict(MutableMapping[_KT, _VT], Generic[_KT, _VT]):
__hash__: None # type: ignore
if sys.version_info >= (3, 9):
def __class_getitem__(cls, item: Any) -> GenericAlias: ...
def __or__(self, __value: Mapping[_KT, _VT]) -> Dict[_KT, _VT]: ...
def __ror__(self, __value: Mapping[_KT, _VT]) -> Dict[_KT, _VT]: ...
def __ior__(self, __value: Mapping[_KT, _VT]) -> Dict[_KT, _VT]: ...
def __or__(self, __value: Mapping[_T1, _T2]) -> Dict[Union[_KT, _T1], Union[_VT, _T2]]: ...
def __ror__(self, __value: Mapping[_T1, _T2]) -> Dict[Union[_KT, _T1], Union[_VT, _T2]]: ...
def __ior__(self, __value: Mapping[_KT, _VT]) -> Dict[_KT, _VT]: ... # type: ignore
class set(MutableSet[_T], Generic[_T]):
def __init__(self, iterable: Iterable[_T] = ...) -> None: ...