diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index d0b40da46..6ae0d4860 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -16,18 +16,18 @@ repos: - id: debug-statements # Clean up imports in Python using isort - repo: https://github.com/pycqa/isort - rev: 5.13.2 + rev: 6.0.1 hooks: - id: isort args: [--filter-files, --profile, black] # Format the python code with black - repo: https://github.com/psf/black - rev: 24.8.0 + rev: 25.1.0 hooks: - id: black # Lint the python code with flake - repo: https://github.com/PyCQA/flake8 - rev: 7.1.1 + rev: 7.2.0 hooks: - id: flake8 # Type check the Python code with pylint @@ -47,13 +47,13 @@ repos: ] # run the bandit security linter - repo: https://github.com/PyCQA/bandit - rev: 1.7.10 + rev: 1.8.3 hooks: - id: bandit args: [-c, bandit.yaml] # Type check the Python code with MyPy - repo: https://github.com/pre-commit/mirrors-mypy - rev: 'v1.11.2' + rev: 'v1.15.0' hooks: - id: mypy verbose: true diff --git a/src/pdl/pdl_ast.py b/src/pdl/pdl_ast.py index 481dba588..86ab4ec74 100644 --- a/src/pdl/pdl_ast.py +++ b/src/pdl/pdl_ast.py @@ -1,5 +1,4 @@ -"""PDL programs are represented by the Pydantic data structure defined in this file. -""" +"""PDL programs are represented by the Pydantic data structure defined in this file.""" from enum import StrEnum from typing import ( diff --git a/src/pdl/pdl_dumper.py b/src/pdl/pdl_dumper.py index e1ab70e4b..c8cfcb661 100644 --- a/src/pdl/pdl_dumper.py +++ b/src/pdl/pdl_dumper.py @@ -378,7 +378,7 @@ def location_to_dict(location: PdlLocationType) -> dict[str, Any]: def contribute_to_list( - contribute: Sequence[ContributeTarget | dict[str, ContributeValue]] + contribute: Sequence[ContributeTarget | dict[str, ContributeValue]], ) -> list[str | dict[str, Any]]: acc: list[str | dict[str, Any]] = [] for contrib in contribute: diff --git a/src/pdl/pdl_interpreter.py b/src/pdl/pdl_interpreter.py index 2b65db9a1..8c3962008 100644 --- a/src/pdl/pdl_interpreter.py +++ b/src/pdl/pdl_interpreter.py @@ -1454,7 +1454,7 @@ def generate_client_response_streaming( def litellm_parameters_to_dict( - parameters: Optional[LitellmParameters | dict[str, Any]] + parameters: Optional[LitellmParameters | dict[str, Any]], ) -> dict[str, Any]: if isinstance(parameters, dict): return {k: v for k, v in parameters.items() if k != "stream"} diff --git a/src/pdl/pdl_utils.py b/src/pdl/pdl_utils.py index f9ee42376..600bc7a8f 100644 --- a/src/pdl/pdl_utils.py +++ b/src/pdl/pdl_utils.py @@ -94,7 +94,7 @@ def replace_contribute_value( def get_contribute_value( - contribute: Sequence[ContributeTarget | dict[str, ContributeValue]] | None + contribute: Sequence[ContributeTarget | dict[str, ContributeValue]] | None, ): if contribute is None: return None