Remove Python 3.8 exclusive branches (#13772)

This commit is contained in:
Sebastian Rittau
2025-04-02 12:32:50 +02:00
committed by GitHub
parent 27729455a5
commit 977f3007b9
4 changed files with 15 additions and 32 deletions
+10 -12
View File
@@ -1,5 +1,4 @@
import abc
import sys
from _collections_abc import dict_items, dict_keys, dict_values
from _typeshed import IdentityFunction, Unused
from collections.abc import Mapping
@@ -27,17 +26,16 @@ class _TypedDict(Mapping[str, object], metaclass=abc.ABCMeta):
def keys(self) -> dict_keys[str, object]: ...
def values(self) -> dict_values[str, object]: ...
def __delitem__(self, k: Never) -> None: ...
if sys.version_info >= (3, 9):
@overload
def __or__(self, value: Self, /) -> Self: ...
@overload
def __or__(self, value: dict[str, Any], /) -> dict[str, object]: ...
@overload
def __ror__(self, value: Self, /) -> Self: ...
@overload
def __ror__(self, value: dict[str, Any], /) -> dict[str, object]: ...
# supposedly incompatible definitions of `__or__` and `__ior__`:
def __ior__(self, value: Self, /) -> Self: ... # type: ignore[misc]
@overload
def __or__(self, value: Self, /) -> Self: ...
@overload
def __or__(self, value: dict[str, Any], /) -> dict[str, object]: ...
@overload
def __ror__(self, value: Self, /) -> Self: ...
@overload
def __ror__(self, value: dict[str, Any], /) -> dict[str, object]: ...
# supposedly incompatible definitions of `__or__` and `__ior__`:
def __ior__(self, value: Self, /) -> Self: ... # type: ignore[misc]
def TypedDict(typename: str, fields: dict[str, type[Any]], total: bool = ...) -> type[dict[str, Any]]: ...
@overload