From 403e1d31148770cde7bb55f5fc74463465a0edf2 Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Mon, 25 Nov 2024 16:30:33 -0500 Subject: [PATCH] chore: update pre-commit hooks (#4616) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * chore: update pre-commit hooks updates: - [github.com/astral-sh/ruff-pre-commit: v0.7.4 → v0.8.0](https://github.com/astral-sh/ruff-pre-commit/compare/v0.7.4...v0.8.0) * style: pre-commit fixes --------- Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> --- .pre-commit-config.yaml | 2 +- tests/unit/test_solvers/test_idaklu_solver.py | 30 +++++++++++-------- 2 files changed, 18 insertions(+), 14 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index fa5a7336f3..9e89aad9e2 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -4,7 +4,7 @@ ci: repos: - repo: https://github.com/astral-sh/ruff-pre-commit - rev: "v0.7.4" + rev: "v0.8.0" hooks: - id: ruff args: [--fix, --show-fixes] diff --git a/tests/unit/test_solvers/test_idaklu_solver.py b/tests/unit/test_solvers/test_idaklu_solver.py index e4d6559e71..10dc0ab610 100644 --- a/tests/unit/test_solvers/test_idaklu_solver.py +++ b/tests/unit/test_solvers/test_idaklu_solver.py @@ -747,20 +747,24 @@ def test_setup_options(self): options=options, ) works = ( - jacobian == "none" - and (linear_solver == "SUNLinSol_Dense") - or jacobian == "dense" - and (linear_solver == "SUNLinSol_Dense") - or jacobian == "sparse" - and ( - linear_solver != "SUNLinSol_Dense" - and linear_solver != "garbage" + (jacobian == "none" and (linear_solver == "SUNLinSol_Dense")) + or ( + jacobian == "dense" and (linear_solver == "SUNLinSol_Dense") ) - or jacobian == "matrix-free" - and ( - linear_solver != "SUNLinSol_KLU" - and linear_solver != "SUNLinSol_Dense" - and linear_solver != "garbage" + or ( + jacobian == "sparse" + and ( + linear_solver != "SUNLinSol_Dense" + and linear_solver != "garbage" + ) + ) + or ( + jacobian == "matrix-free" + and ( + linear_solver != "SUNLinSol_KLU" + and linear_solver != "SUNLinSol_Dense" + and linear_solver != "garbage" + ) ) )