From 071577a5c5fe2705a4312184fa4df2b6cedbbf05 Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Mon, 15 Jul 2024 18:03:00 +0000 Subject: [PATCH 1/2] chore: update pre-commit hooks MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit updates: - [github.com/astral-sh/ruff-pre-commit: v0.5.1 → v0.5.2](https://github.com/astral-sh/ruff-pre-commit/compare/v0.5.1...v0.5.2) --- .pre-commit-config.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 82299a92..28055658 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.5.1" + rev: "v0.5.2" hooks: - id: ruff args: [--fix, --show-fixes] From 4f7eb591d97a62250485c3ccfe5ba56594465b5b Mon Sep 17 00:00:00 2001 From: Brady Planden Date: Mon, 15 Jul 2024 19:58:34 +0100 Subject: [PATCH 2/2] fix E721, '==' assertions --- tests/unit/test_cost.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/unit/test_cost.py b/tests/unit/test_cost.py index 09372376..6a7d1a90 100644 --- a/tests/unit/test_cost.py +++ b/tests/unit/test_cost.py @@ -203,7 +203,7 @@ def test_costs(self, cost): e, de = cost.evaluateS1([0.5]) assert np.isscalar(e) - assert type(de) == np.ndarray + assert isinstance(de, np.ndarray) # Test exception for non-numeric inputs with pytest.raises(