mirror of
https://github.com/davidhalter/typeshed.git
synced 2026-06-25 10:14:05 +08:00
Remove Python 3.8 exclusive branches (#13772)
This commit is contained in:
@@ -1,14 +1,9 @@
|
||||
import datetime
|
||||
import sys
|
||||
from typing import Final, Literal
|
||||
from zoneinfo import ZoneInfo
|
||||
|
||||
from dateutil.rrule import rrule, rruleset
|
||||
|
||||
if sys.version_info >= (3, 9):
|
||||
from zoneinfo import ZoneInfo
|
||||
else:
|
||||
from backports.zoneinfo import ZoneInfo
|
||||
|
||||
from ..cal import Timezone
|
||||
from ..prop import vRecur
|
||||
from .provider import TZProvider
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -1,15 +1,12 @@
|
||||
import sys
|
||||
from _typeshed import ReadableBuffer, Unused
|
||||
from collections.abc import Callable, Mapping
|
||||
from types import GenericAlias
|
||||
from typing import Any, AnyStr, Generic, Literal, TypeVar, final, overload
|
||||
from typing_extensions import Self
|
||||
|
||||
from . import _regex
|
||||
from ._regex_core import *
|
||||
|
||||
if sys.version_info >= (3, 9):
|
||||
from types import GenericAlias
|
||||
|
||||
_T = TypeVar("_T")
|
||||
|
||||
__version__: str
|
||||
@@ -569,8 +566,7 @@ class Pattern(Generic[AnyStr]):
|
||||
) -> _regex.Scanner[bytes]: ...
|
||||
def __copy__(self) -> Self: ...
|
||||
def __deepcopy__(self, memo: Unused, /) -> Self: ...
|
||||
if sys.version_info >= (3, 9):
|
||||
def __class_getitem__(cls, item: Any, /) -> GenericAlias: ...
|
||||
def __class_getitem__(cls, item: Any, /) -> GenericAlias: ...
|
||||
|
||||
@final
|
||||
class Match(Generic[AnyStr]):
|
||||
@@ -648,5 +644,4 @@ class Match(Generic[AnyStr]):
|
||||
def __getitem__(self, key: int | str, /) -> AnyStr | Any: ...
|
||||
def __copy__(self) -> Self: ...
|
||||
def __deepcopy__(self, memo: Unused, /) -> Self: ...
|
||||
if sys.version_info >= (3, 9):
|
||||
def __class_getitem__(cls, item: Any, /) -> GenericAlias: ...
|
||||
def __class_getitem__(cls, item: Any, /) -> GenericAlias: ...
|
||||
|
||||
@@ -1,6 +1 @@
|
||||
import sys
|
||||
|
||||
if sys.version_info >= (3, 9):
|
||||
from _thread import *
|
||||
else:
|
||||
from _dummy_thread import *
|
||||
from _thread import *
|
||||
|
||||
Reference in New Issue
Block a user