Skip to content

Commit 31afc75

Browse files
authored
Revert "remove dict.__or__ overloads (#14284)"
This reverts commit bfb7342.
1 parent 25bc534 commit 31afc75

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

stdlib/builtins.pyi

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1240,7 +1240,13 @@ class dict(MutableMapping[_KT, _VT]):
12401240
def __reversed__(self) -> Iterator[_KT]: ...
12411241
__hash__: ClassVar[None] # type: ignore[assignment]
12421242
def __class_getitem__(cls, item: Any, /) -> GenericAlias: ...
1243+
@overload
1244+
def __or__(self, value: dict[_KT, _VT], /) -> dict[_KT, _VT]: ...
1245+
@overload
12431246
def __or__(self, value: dict[_T1, _T2], /) -> dict[_KT | _T1, _VT | _T2]: ...
1247+
@overload
1248+
def __ror__(self, value: dict[_KT, _VT], /) -> dict[_KT, _VT]: ...
1249+
@overload
12441250
def __ror__(self, value: dict[_T1, _T2], /) -> dict[_KT | _T1, _VT | _T2]: ...
12451251
# dict.__ior__ should be kept roughly in line with MutableMapping.update()
12461252
@overload # type: ignore[misc]

0 commit comments

Comments
 (0)