Skip to content

Commit

Permalink
[pre-commit.ci] auto fixes from pre-commit.com hooks
Browse files Browse the repository at this point in the history
for more information, see https://pre-commit.ci
  • Loading branch information
pre-commit-ci[bot] committed May 12, 2024
1 parent 893f758 commit 7c04b8a
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
3 changes: 2 additions & 1 deletion piptools/_compat/pip_compat.py
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ def _from_pkg_resources(cls, dist: _PkgResourcesDist) -> Distribution:
@classmethod
def _from_importlib(cls, dist: _ImportLibDist) -> Distribution:
"""Mimic pkg_resources.Distribution.requires for the case of no
extras.
extras.
This doesn't fulfill that API's ``extras`` parameter but
satisfies the needs of pip-tools.
Expand All @@ -69,6 +69,7 @@ def _from_importlib(cls, dist: _ImportLibDist) -> Distribution:

class FileLink(Link): # type: ignore[misc]
"""Wrapper for ``pip``'s ``Link`` class."""

_url: str

@property
Expand Down
8 changes: 4 additions & 4 deletions piptools/resolver.py
Original file line number Diff line number Diff line change
Expand Up @@ -343,7 +343,7 @@ def _resolve_one_round(self) -> tuple[bool, set[InstallRequirement]]:
:returns: whether new constraints appeared in this round. If no
constraints were added or changed, this indicates a stable
configuration.
configuration.
"""
# Sort this list for readability of terminal output
constraints = sorted(self.constraints, key=key_from_ireq)
Expand Down Expand Up @@ -554,7 +554,7 @@ def resolve(self, max_rounds: int = 10) -> set[InstallRequirement]:
Find concrete package versions for all the given InstallRequirements
and their recursive dependencies.
:returns: A set of pinned ``InstallRequirement``\ s.
"""
with update_env_context_manager(
Expand Down Expand Up @@ -662,8 +662,8 @@ def _do_resolve(
"""
Resolve dependencies based on resolvelib ``Resolver``.
:returns: :py:data:`True` on successful resolution, otherwise removes
problematic requirements from existing constraints and
:returns: :py:data:`True` on successful resolution, otherwise removes
problematic requirements from existing constraints and
returns :py:data:`False`.
"""
try:
Expand Down

0 comments on commit 7c04b8a

Please sign in to comment.