From 644ac8aecfe47b253450b7da6b5650d417bea6c5 Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Mon, 29 Jan 2024 17:34:28 +0000 Subject: [PATCH 1/2] [pre-commit.ci] pre-commit autoupdate MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit updates: - [github.com/psf/black: 23.11.0 → 24.1.1](https://github.com/psf/black/compare/23.11.0...24.1.1) - [github.com/PyCQA/isort: 5.12.0 → 5.13.2](https://github.com/PyCQA/isort/compare/5.12.0...5.13.2) - [github.com/PyCQA/flake8: 6.1.0 → 7.0.0](https://github.com/PyCQA/flake8/compare/6.1.0...7.0.0) - [github.com/pre-commit/mirrors-mypy: v1.7.1 → v1.8.0](https://github.com/pre-commit/mirrors-mypy/compare/v1.7.1...v1.8.0) - [github.com/PyCQA/bandit: 1.7.5 → 1.7.7](https://github.com/PyCQA/bandit/compare/1.7.5...1.7.7) - [github.com/pre-commit/mirrors-prettier: v3.1.0 → v4.0.0-alpha.8](https://github.com/pre-commit/mirrors-prettier/compare/v3.1.0...v4.0.0-alpha.8) --- .pre-commit-config.yaml | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index d0cca10f..8c451614 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -1,11 +1,11 @@ repos: - repo: https://github.com/psf/black - rev: 23.11.0 + rev: 24.1.1 hooks: - id: black args: [--target-version=py38] - repo: https://github.com/PyCQA/isort - rev: 5.12.0 + rev: 5.13.2 hooks: - id: isort - repo: https://github.com/asottile/pyupgrade @@ -14,13 +14,13 @@ repos: - id: pyupgrade args: [--py38-plus] - repo: https://github.com/PyCQA/flake8 - rev: 6.1.0 + rev: 7.0.0 hooks: - id: flake8 additional_dependencies: - flake8-pytest-style - repo: https://github.com/pre-commit/mirrors-mypy - rev: v1.7.1 + rev: v1.8.0 hooks: - id: mypy # Avoid error: Duplicate module named 'setup' @@ -37,13 +37,13 @@ repos: - pytest==7.4.2 language_version: python3.8 - repo: https://github.com/PyCQA/bandit - rev: 1.7.5 + rev: 1.7.7 hooks: - id: bandit args: [--ini, .bandit] exclude: ^tests/ - repo: https://github.com/pre-commit/mirrors-prettier - rev: v3.1.0 + rev: v4.0.0-alpha.8 hooks: - id: prettier additional_dependencies: From 39cbff869218d6e8395d6269bf477759895a7a2e Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Mon, 29 Jan 2024 17:36:01 +0000 Subject: [PATCH 2/2] [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --- piptools/build.py | 6 ++---- piptools/resolver.py | 6 +++--- 2 files changed, 5 insertions(+), 7 deletions(-) diff --git a/piptools/build.py b/piptools/build.py index 6f87c32e..d641891a 100644 --- a/piptools/build.py +++ b/piptools/build.py @@ -26,12 +26,10 @@ class PackageMetadata(Protocol): @overload - def get_all(self, name: str, failobj: None = None) -> list[Any] | None: - ... + def get_all(self, name: str, failobj: None = None) -> list[Any] | None: ... @overload - def get_all(self, name: str, failobj: _T) -> list[Any] | _T: - ... + def get_all(self, name: str, failobj: _T) -> list[Any] | _T: ... @dataclass diff --git a/piptools/resolver.py b/piptools/resolver.py index aaa8cd60..0591985b 100644 --- a/piptools/resolver.py +++ b/piptools/resolver.py @@ -504,9 +504,9 @@ def __init__( self.existing_constraints = existing_constraints # Categorize InstallRequirements into sets by key - constraints_sets: DefaultDict[ - str, set[InstallRequirement] - ] = collections.defaultdict(set) + constraints_sets: DefaultDict[str, set[InstallRequirement]] = ( + collections.defaultdict(set) + ) for ireq in constraints: constraints_sets[key_from_ireq(ireq)].add(ireq) # Collapse each set of InstallRequirements using combine_install_requirements