Skip to content

Commit 4027add

Browse files
utkarsh2102srittau
authored andcommitted
__init__.pyi: Add missing methods on pkg_resources.VersionConflict (#3318)
1 parent d82d339 commit 4027add

File tree

1 file changed

+14
-2
lines changed

1 file changed

+14
-2
lines changed

third_party/3/pkg_resources/__init__.pyi

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Stubs for pkg_resources (Python 3.4)
22

3-
from typing import Any, Callable, Dict, IO, Iterable, Generator, Optional, Sequence, Tuple, List, Union, TypeVar, overload
3+
from typing import Any, Callable, Dict, IO, Iterable, Generator, Optional, Sequence, Tuple, List, Set, Union, TypeVar, overload
44
from abc import ABCMeta
55
import importlib.abc
66
import types
@@ -202,7 +202,19 @@ class IMetadataProvider:
202202

203203
class ResolutionError(Exception): ...
204204
class DistributionNotFound(ResolutionError): ...
205-
class VersionConflict(ResolutionError): ...
205+
206+
class VersionConflict(ResolutionError):
207+
@property
208+
def dist(self) -> Any: ...
209+
@property
210+
def req(self) -> Any: ...
211+
def report(self) -> str: ...
212+
def with_context(self, required_by: Dict[str, Any]) -> VersionConflict: ...
213+
214+
class ContextualVersionConflict(VersionConflict):
215+
@property
216+
def required_by(self) -> Set[Any]: ...
217+
206218
class UnknownExtra(ResolutionError): ...
207219

208220
class ExtractionError(Exception):

0 commit comments

Comments
 (0)