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: 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