diff --git a/piptools/_compat/pip_compat.py b/piptools/_compat/pip_compat.py index 3547f7e3..3f52864b 100644 --- a/piptools/_compat/pip_compat.py +++ b/piptools/_compat/pip_compat.py @@ -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. @@ -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 diff --git a/piptools/resolver.py b/piptools/resolver.py index da9fb0e6..6b91f0c7 100644 --- a/piptools/resolver.py +++ b/piptools/resolver.py @@ -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) @@ -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( @@ -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: