Use PEP 604 syntax wherever possible (#7493)

This commit is contained in:
Alex Waygood authored and GitHub committed 2022-03-16 16:01:33 +01:00
1 parent 15e21a8dc1
commit 3ab250eec8
174 files changed
+472 -490

No files matched your search

+6 -6
View File
@@ -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]