From e230f5f43f4ed0626d5e2442a2451800e6c05691 Mon Sep 17 00:00:00 2001 From: "brainless-bot[bot]" <153751247+brainless-bot[bot]@users.noreply.github.com> Date: Wed, 9 Oct 2024 11:32:48 +0000 Subject: [PATCH] Autoformat with black --- unit_tests/test_metrics.py | 28 ++++++++++++++++++++++++---- unit_tests/test_panoptic_pipeline.py | 6 +++++- unit_tests/test_utils.py | 6 +++++- 3 files changed, 34 insertions(+), 6 deletions(-) diff --git a/unit_tests/test_metrics.py b/unit_tests/test_metrics.py index e26203c..f889c10 100644 --- a/unit_tests/test_metrics.py +++ b/unit_tests/test_metrics.py @@ -97,7 +97,12 @@ def setUp(self) -> None: def test_rvd_case_simple_identical(self): pred_arr, ref_arr = case_simple_identical() - rvd = Metric.RVD(reference_arr=ref_arr, prediction_arr=pred_arr, ref_instance_idx=1, pred_instance_idx=1) + rvd = Metric.RVD( + reference_arr=ref_arr, + prediction_arr=pred_arr, + ref_instance_idx=1, + pred_instance_idx=1, + ) self.assertEqual(rvd, 0.0) def test_rvd_case_simple_identical_idx(self): @@ -139,7 +144,12 @@ def test_dsc_case_simple_identical(self): def test_dsc_case_simple_identical_idx(self): pred_arr, ref_arr = case_simple_identical() - dsc = Metric.DSC(reference_arr=ref_arr, prediction_arr=pred_arr, ref_instance_idx=1, pred_instance_idx=1) + dsc = Metric.DSC( + reference_arr=ref_arr, + prediction_arr=pred_arr, + ref_instance_idx=1, + pred_instance_idx=1, + ) self.assertEqual(dsc, 1.0) def test_dsc_case_simple_nooverlap(self): @@ -173,7 +183,12 @@ def test_st_case_simple_identical(self): def test_st_case_simple_identical_idx(self): pred_arr, ref_arr = case_simple_identical() - st = Metric.ASSD(reference_arr=ref_arr, prediction_arr=pred_arr, ref_instance_idx=1, pred_instance_idx=1) + st = Metric.ASSD( + reference_arr=ref_arr, + prediction_arr=pred_arr, + ref_instance_idx=1, + pred_instance_idx=1, + ) self.assertEqual(st, 0.0) def test_st_case_simple_nooverlap(self): @@ -204,7 +219,12 @@ def test_st_case_simple_identical(self): def test_st_case_simple_identical_idx(self): pred_arr, ref_arr = case_simple_identical() - st = Metric.clDSC(reference_arr=ref_arr, prediction_arr=pred_arr, ref_instance_idx=1, pred_instance_idx=1) + st = Metric.clDSC( + reference_arr=ref_arr, + prediction_arr=pred_arr, + ref_instance_idx=1, + pred_instance_idx=1, + ) self.assertEqual(st, 1.0) def test_st_case_simple_nooverlap(self): diff --git a/unit_tests/test_panoptic_pipeline.py b/unit_tests/test_panoptic_pipeline.py index 2d75a95..cd2bb6f 100644 --- a/unit_tests/test_panoptic_pipeline.py +++ b/unit_tests/test_panoptic_pipeline.py @@ -9,7 +9,11 @@ from panoptica import InputType from panoptica.instance_approximator import ConnectedComponentsInstanceApproximator -from panoptica.instance_matcher import MaximizeMergeMatching, NaiveThresholdMatching, InstanceLabelMap +from panoptica.instance_matcher import ( + MaximizeMergeMatching, + NaiveThresholdMatching, + InstanceLabelMap, +) from panoptica.metrics import Metric from panoptica.instance_evaluator import ( evaluate_matched_instance, diff --git a/unit_tests/test_utils.py b/unit_tests/test_utils.py index 8433e67..b74f20b 100644 --- a/unit_tests/test_utils.py +++ b/unit_tests/test_utils.py @@ -5,7 +5,11 @@ import os import unittest import numpy as np -from panoptica.utils.numpy_utils import _unique_without_zeros, _count_unique_without_zeros, _get_smallest_fitting_uint +from panoptica.utils.numpy_utils import ( + _unique_without_zeros, + _count_unique_without_zeros, + _get_smallest_fitting_uint, +) from panoptica.utils.citation_reminder import citation_reminder