mirror of
https://github.com/davidhalter/typeshed.git
synced 2026-03-01 12:56:51 +08:00
Use PEP 604 syntax wherever possible (#7493)
This commit is contained in:
@@ -3,17 +3,17 @@ import types
|
||||
import zipimport
|
||||
from _typeshed import Self
|
||||
from abc import ABCMeta
|
||||
from typing import IO, Any, Callable, Generator, Iterable, Optional, Sequence, TypeVar, Union, overload
|
||||
from typing import IO, Any, Callable, Generator, Iterable, Sequence, TypeVar, overload
|
||||
|
||||
LegacyVersion = Any # from packaging.version
|
||||
Version = Any # from packaging.version
|
||||
|
||||
_T = TypeVar("_T")
|
||||
_NestedStr = Union[str, Iterable[Union[str, Iterable[Any]]]]
|
||||
_InstallerType = Callable[[Requirement], Optional[Distribution]]
|
||||
_EPDistType = Union[Distribution, Requirement, str]
|
||||
_MetadataType = Optional[IResourceProvider]
|
||||
_PkgReqType = Union[str, Requirement]
|
||||
_NestedStr = str | Iterable[str | Iterable[Any]]
|
||||
_InstallerType = Callable[[Requirement], Distribution | None]
|
||||
_EPDistType = Distribution | Requirement | str
|
||||
_MetadataType = IResourceProvider | None
|
||||
_PkgReqType = str | Requirement
|
||||
_DistFinderType = Callable[[_Importer, str, bool], Generator[Distribution, None, None]]
|
||||
_NSHandlerType = Callable[[_Importer, str, str, types.ModuleType], str]
|
||||
|
||||
|
||||
Reference in New Issue
Block a user