|
1 | 1 | import abc |
2 | | -import sys |
3 | 2 | from _collections_abc import dict_items, dict_keys, dict_values |
4 | 3 | from _typeshed import IdentityFunction, Unused |
5 | 4 | from collections.abc import Mapping |
@@ -27,17 +26,16 @@ class _TypedDict(Mapping[str, object], metaclass=abc.ABCMeta): |
27 | 26 | def keys(self) -> dict_keys[str, object]: ... |
28 | 27 | def values(self) -> dict_values[str, object]: ... |
29 | 28 | def __delitem__(self, k: Never) -> None: ... |
30 | | - if sys.version_info >= (3, 9): |
31 | | - @overload |
32 | | - def __or__(self, value: Self, /) -> Self: ... |
33 | | - @overload |
34 | | - def __or__(self, value: dict[str, Any], /) -> dict[str, object]: ... |
35 | | - @overload |
36 | | - def __ror__(self, value: Self, /) -> Self: ... |
37 | | - @overload |
38 | | - def __ror__(self, value: dict[str, Any], /) -> dict[str, object]: ... |
39 | | - # supposedly incompatible definitions of `__or__` and `__ior__`: |
40 | | - def __ior__(self, value: Self, /) -> Self: ... # type: ignore[misc] |
| 29 | + @overload |
| 30 | + def __or__(self, value: Self, /) -> Self: ... |
| 31 | + @overload |
| 32 | + def __or__(self, value: dict[str, Any], /) -> dict[str, object]: ... |
| 33 | + @overload |
| 34 | + def __ror__(self, value: Self, /) -> Self: ... |
| 35 | + @overload |
| 36 | + def __ror__(self, value: dict[str, Any], /) -> dict[str, object]: ... |
| 37 | + # supposedly incompatible definitions of `__or__` and `__ior__`: |
| 38 | + def __ior__(self, value: Self, /) -> Self: ... # type: ignore[misc] |
41 | 39 |
|
42 | 40 | def TypedDict(typename: str, fields: dict[str, type[Any]], total: bool = ...) -> type[dict[str, Any]]: ... |
43 | 41 | @overload |
|
0 commit comments