diff --git a/third_party/3/pkg_resources/__init__.pyi b/third_party/3/pkg_resources/__init__.pyi index 55914e12b..0b6eb3af0 100644 --- a/third_party/3/pkg_resources/__init__.pyi +++ b/third_party/3/pkg_resources/__init__.pyi @@ -1,6 +1,6 @@ # Stubs for pkg_resources (Python 3.4) -from typing import Any, Callable, Dict, IO, Iterable, Generator, Optional, Sequence, Tuple, List, Union, TypeVar, overload +from typing import Any, Callable, Dict, IO, Iterable, Generator, Optional, Sequence, Tuple, List, Set, Union, TypeVar, overload from abc import ABCMeta import importlib.abc import types @@ -202,7 +202,19 @@ class IMetadataProvider: class ResolutionError(Exception): ... class DistributionNotFound(ResolutionError): ... -class VersionConflict(ResolutionError): ... + +class VersionConflict(ResolutionError): + @property + def dist(self) -> Any: ... + @property + def req(self) -> Any: ... + def report(self) -> str: ... + def with_context(self, required_by: Dict[str, Any]) -> VersionConflict: ... + +class ContextualVersionConflict(VersionConflict): + @property + def required_by(self) -> Set[Any]: ... + class UnknownExtra(ResolutionError): ... class ExtractionError(Exception):