Skip to content

Commit

Permalink
Rename _InstallerTypeT
Browse files Browse the repository at this point in the history
  • Loading branch information
Avasam committed Jun 26, 2024
1 parent 222ebf9 commit 544c726
Showing 1 changed file with 11 additions and 11 deletions.
22 changes: 11 additions & 11 deletions pkg_resources/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@
_DistributionT = TypeVar("_DistributionT", bound="Distribution")
# Type aliases
_NestedStr = Union[str, Iterable[Union[str, Iterable["_NestedStr"]]]]
_InstallerTypeT = Callable[["Requirement"], "_DistributionT"]
_StrictInstallerType = Callable[["Requirement"], "_DistributionT"]
_InstallerType = Callable[["Requirement"], Union["Distribution", None]]
_PkgReqType = Union[str, "Requirement"]
_EPDistType = Union["Distribution", _PkgReqType]
Expand Down Expand Up @@ -807,7 +807,7 @@ def resolve(
self,
requirements: Iterable[Requirement],
env: Environment | None,
installer: _InstallerTypeT[_DistributionT],
installer: _StrictInstallerType[_DistributionT],
replace_conflicting: bool = False,
extras: tuple[str, ...] | None = None,
) -> list[_DistributionT]: ...
Expand All @@ -817,7 +817,7 @@ def resolve(
requirements: Iterable[Requirement],
env: Environment | None = None,
*,
installer: _InstallerTypeT[_DistributionT],
installer: _StrictInstallerType[_DistributionT],
replace_conflicting: bool = False,
extras: tuple[str, ...] | None = None,
) -> list[_DistributionT]: ...
Expand All @@ -834,7 +834,7 @@ def resolve(
self,
requirements: Iterable[Requirement],
env: Environment | None = None,
installer: _InstallerType | None | _InstallerTypeT[_DistributionT] = None,
installer: _InstallerType | None | _StrictInstallerType[_DistributionT] = None,
replace_conflicting: bool = False,
extras: tuple[str, ...] | None = None,
) -> list[Distribution] | list[_DistributionT]:
Expand Down Expand Up @@ -940,7 +940,7 @@ def find_plugins(
self,
plugin_env: Environment,
full_env: Environment | None,
installer: _InstallerTypeT[_DistributionT],
installer: _StrictInstallerType[_DistributionT],
fallback: bool = True,
) -> tuple[list[_DistributionT], dict[Distribution, Exception]]: ...
@overload
Expand All @@ -949,7 +949,7 @@ def find_plugins(
plugin_env: Environment,
full_env: Environment | None = None,
*,
installer: _InstallerTypeT[_DistributionT],
installer: _StrictInstallerType[_DistributionT],
fallback: bool = True,
) -> tuple[list[_DistributionT], dict[Distribution, Exception]]: ...
@overload
Expand All @@ -964,7 +964,7 @@ def find_plugins(
self,
plugin_env: Environment,
full_env: Environment | None = None,
installer: _InstallerType | None | _InstallerTypeT[_DistributionT] = None,
installer: _InstallerType | None | _StrictInstallerType[_DistributionT] = None,
fallback: bool = True,
) -> tuple[
list[Distribution] | list[_DistributionT],
Expand Down Expand Up @@ -1211,7 +1211,7 @@ def best_match(
self,
req: Requirement,
working_set: WorkingSet,
installer: _InstallerTypeT[_DistributionT],
installer: _StrictInstallerType[_DistributionT],
replace_conflicting: bool = False,
) -> _DistributionT: ...
@overload
Expand All @@ -1226,7 +1226,7 @@ def best_match(
self,
req: Requirement,
working_set: WorkingSet,
installer: _InstallerType | None | _InstallerTypeT[_DistributionT] = None,
installer: _InstallerType | None | _StrictInstallerType[_DistributionT] = None,
replace_conflicting: bool = False,
) -> Distribution | None:
"""Find distribution best matching `req` and usable on `working_set`
Expand Down Expand Up @@ -1259,7 +1259,7 @@ def best_match(
def obtain(
self,
requirement: Requirement,
installer: _InstallerTypeT[_DistributionT],
installer: _StrictInstallerType[_DistributionT],
) -> _DistributionT: ...
@overload
def obtain(
Expand All @@ -1279,7 +1279,7 @@ def obtain(
installer: Callable[[Requirement], None]
| _InstallerType
| None
| _InstallerTypeT[_DistributionT] = None,
| _StrictInstallerType[_DistributionT] = None,
) -> Distribution | None:
"""Obtain a distribution matching `requirement` (e.g. via download)
Expand Down

0 comments on commit 544c726

Please sign in to comment.