From b003a95733d955d5515cfe51cae537184d3f8f53 Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Mon, 22 Jan 2024 17:21:20 +0100 Subject: [PATCH] ci: [pre-commit.ci] pre-commit autoupdate (#1059) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit updates: - [github.com/astral-sh/ruff-pre-commit: v0.1.9 → v0.1.13](https://github.com/astral-sh/ruff-pre-commit/compare/v0.1.9...v0.1.13) --------- Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> Co-authored-by: Grzegorz Bokota --- .pre-commit-config.yaml | 2 +- package/tests/test_PartSegCore/test_io.py | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index d91fd7320..fc10a5186 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -25,7 +25,7 @@ repos: - id: setup-cfg-fmt args: ["--include-version-classifiers", "--max-py-version", "3.11"] - repo: https://github.com/astral-sh/ruff-pre-commit - rev: v0.1.9 + rev: v0.1.14 hooks: - id: ruff - repo: https://github.com/asottile/pyupgrade diff --git a/package/tests/test_PartSegCore/test_io.py b/package/tests/test_PartSegCore/test_io.py index effe75e44..b61be80b2 100644 --- a/package/tests/test_PartSegCore/test_io.py +++ b/package/tests/test_PartSegCore/test_io.py @@ -234,7 +234,7 @@ def perform_roi_info_history_test( alt2[alt2 > 0] = i + 5 roi_info2 = ROIInfo( roi=project.roi_info.roi, - annotations={i: f"a{i}_{j}" for j in range(1, 5)}, + annotations={j: f"a{i}_{j}" for j in range(1, 5)}, alternative={f"test{i}": alt2}, ) history.append( @@ -257,7 +257,7 @@ def perform_roi_info_history_test( assert set(roi_info3.alternative) == {f"test{i}"} assert np.all(roi_info3.alternative[f"test{i}"][alt1 > 0] == i + 5) assert np.all(roi_info3.alternative[f"test{i}"][alt1 == 0] == 0) - assert roi_info3.annotations == {i: f"a{i}_{j}" for j in range(1, 5)} + assert roi_info3.annotations == {j: f"a{i}_{j}" for j in range(1, 5)} assert proj2.history[i].roi_extraction_parameters == {"algorithm_name": f"task_{i}", "values": {"a": 1}}