Reduce use of deprecated typing aliases (#6358)

This commit is contained in:
Alex Waygood
2021-11-23 09:56:43 +00:00
committed by GitHub
parent 7e836db2f3
commit c685c2d6c6
19 changed files with 64 additions and 61 deletions

View File

@@ -2,7 +2,7 @@ import importlib.abc
import types
import zipimport
from abc import ABCMeta
from typing import IO, Any, Callable, Generator, Iterable, Optional, Sequence, Set, Tuple, TypeVar, Union, overload
from typing import IO, Any, Callable, Generator, Iterable, Optional, Sequence, Tuple, TypeVar, Union, overload
LegacyVersion = Any # from packaging.version
Version = Any # from packaging.version
@@ -203,7 +203,7 @@ class DistributionNotFound(ResolutionError):
@property
def req(self) -> Requirement: ...
@property
def requirers(self) -> Set[str]: ...
def requirers(self) -> set[str]: ...
@property
def requirers_str(self) -> str: ...
def report(self) -> str: ...
@@ -214,11 +214,11 @@ class VersionConflict(ResolutionError):
@property
def req(self) -> Any: ...
def report(self) -> str: ...
def with_context(self, required_by: Set[Distribution | str]) -> VersionConflict: ...
def with_context(self, required_by: set[Distribution | str]) -> VersionConflict: ...
class ContextualVersionConflict(VersionConflict):
@property
def required_by(self) -> Set[Distribution | str]: ...
def required_by(self) -> set[Distribution | str]: ...
class UnknownExtra(ResolutionError): ...