mirror of
https://github.com/davidhalter/typeshed.git
synced 2025-12-09 05:24:52 +08:00
Use PEP 604 syntax wherever possible (#7493)
This commit is contained in:
@@ -1,18 +1,6 @@
|
||||
import sys
|
||||
from _typeshed import Self, _T_co
|
||||
from typing import (
|
||||
Any,
|
||||
Callable,
|
||||
Generic,
|
||||
Iterable,
|
||||
Iterator,
|
||||
SupportsComplex,
|
||||
SupportsFloat,
|
||||
SupportsInt,
|
||||
TypeVar,
|
||||
Union,
|
||||
overload,
|
||||
)
|
||||
from typing import Any, Callable, Generic, Iterable, Iterator, SupportsComplex, SupportsFloat, SupportsInt, TypeVar, overload
|
||||
from typing_extensions import Literal, SupportsIndex
|
||||
|
||||
if sys.version_info >= (3, 9):
|
||||
@@ -21,7 +9,7 @@ if sys.version_info >= (3, 9):
|
||||
_T = TypeVar("_T")
|
||||
_S = TypeVar("_S")
|
||||
_N = TypeVar("_N", int, float, SupportsFloat, SupportsInt, SupportsIndex, SupportsComplex)
|
||||
_Step = Union[int, float, SupportsFloat, SupportsInt, SupportsIndex, SupportsComplex]
|
||||
_Step = int | float | SupportsFloat | SupportsInt | SupportsIndex | SupportsComplex
|
||||
|
||||
Predicate = Callable[[_T], object]
|
||||
|
||||
|
||||
Reference in New Issue
Block a user