pkg_resources: Fix unconstrained TypeVars (#7941)

499c468a57/pkg_resources/__init__.py (L1049)

Part of #7928
This commit is contained in:
Jelle Zijlstra
2022-05-24 19:49:22 -07:00
committed by GitHub
parent 54e11a1ec4
commit bb119544d8

View File

@@ -58,13 +58,15 @@ class Environment:
def __add__(self, other: Distribution | Environment) -> Environment: ...
def __iadd__(self: Self, other: Distribution | Environment) -> Self: ...
@overload
def best_match(self, req: Requirement, working_set: WorkingSet) -> Distribution: ...
def best_match(self, req: Requirement, working_set: WorkingSet, *, replace_conflicting: bool = ...) -> Distribution: ...
@overload
def best_match(self, req: Requirement, working_set: WorkingSet, installer: Callable[[Requirement], _T] = ...) -> _T: ...
def best_match(
self, req: Requirement, working_set: WorkingSet, installer: Callable[[Requirement], _T], replace_conflicting: bool = ...
) -> _T: ...
@overload
def obtain(self, requirement: Requirement) -> None: ...
@overload
def obtain(self, requirement: Requirement, installer: Callable[[Requirement], _T] = ...) -> _T: ...
def obtain(self, requirement: Requirement, installer: Callable[[Requirement], _T]) -> _T: ...
def scan(self, search_path: Sequence[str] | None = ...) -> None: ...
def parse_requirements(strs: str | Iterable[str]) -> Generator[Requirement, None, None]: ...