Skip to content

Commit

Permalink
Brighten up docstrings
Browse files Browse the repository at this point in the history
Also remove unrelated `tox.ini` change.

Co-authored-by: Sviatoslav Sydorenko (Святослав Сидоренко) <wk.cvs.github@sydorenko.org.ua>
  • Loading branch information
chrysle and webknjaz committed Feb 26, 2024
1 parent cb783cc commit 5823c44
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 10 deletions.
6 changes: 3 additions & 3 deletions docs/conf.py
Expand Up @@ -61,8 +61,6 @@
r"^https://img.shields.io/matrix",
]

suppress_warnings = ["myst.xref_missing"]

nitpick_ignore_regex = [
("py:class", "pip.*"),
("py:class", "pathlib.*"),
Expand All @@ -75,14 +73,16 @@
("py:exc", "click.*"),
]

suppress_warnings = ["myst.xref_missing"]

# -- Apidoc options -------------------------------------------------------
apidoc_excluded_paths: list[str] = []
apidoc_extra_args = [
"--implicit-namespaces",
"--private", # include “_private” modules
]
apidoc_module_dir = "../piptools"
apidoc_module_first = False
apidoc_module_dir = "../piptools"
apidoc_output_dir = "pkg"
apidoc_separate_modules = True
apidoc_toc_file = None
12 changes: 7 additions & 5 deletions piptools/resolver.py
Expand Up @@ -185,9 +185,7 @@ def _filter_out_unsafe_constraints(

class LegacyResolver(BaseResolver):
"""
Resolve a given set of constraints (a collection of
InstallRequirement objects) by consulting the given Repository and the
DependencyCache.
Wrapper for the (deprecated) legacy dependency resolver.
"""

def __init__(
Expand All @@ -201,6 +199,10 @@ def __init__(
allow_unsafe: bool = False,
unsafe_packages: set[str] | None = None,
) -> None:
"""
Make sure the legacy resolver is enabled and no backtracking resolver
is present.
"""
self.our_constraints = set(constraints)
self.their_constraints: set[InstallRequirement] = set()
self.repository = repository
Expand Down Expand Up @@ -423,7 +425,7 @@ def _iter_dependencies(
self, ireq: InstallRequirement
) -> Iterator[InstallRequirement]:
"""
Collect all secondary dependencies for an ireq.
Emit all secondary dependencies for an ireq.
Given a pinned, url, or editable InstallRequirement, collects all the
secondary dependencies for them, either by looking them up in a local
Expand Down Expand Up @@ -640,7 +642,7 @@ def _do_resolve(
compatible_existing_constraints: dict[str, InstallRequirement],
) -> bool:
"""
Actual resolution process.
Resolve dependencies based resolvelib ``Resolver``.
Return True on successful resolution, otherwise remove problematic
requirements from existing constraints and return false.
Expand Down
3 changes: 1 addition & 2 deletions tox.ini
Expand Up @@ -52,9 +52,8 @@ skip_install = true

[testenv:pip-compile-docs]
description = compile requirements for the documentation
changedir = {[testenv:build-docs]changedir}
commands_pre =
commands = python -m piptools compile --strip-extras --allow-unsafe --quiet requirements.in {posargs}
commands = python -m piptools compile --strip-extras --allow-unsafe --quiet docs/requirements.in {posargs}

[testenv:build-docs]
description = build the documentation
Expand Down

0 comments on commit 5823c44

Please sign in to comment.