From a4cf2604eecf7bdd7f289466576b58141b7079c4 Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Mon, 12 Aug 2024 11:10:53 +0000 Subject: [PATCH] =?UTF-8?q?fix(pre=5Fcommit):=20=F0=9F=8E=A8=20auto=20form?= =?UTF-8?q?at=20pre-commit=20hooks?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- supervision/metrics/core.py | 4 +++- test/metrics/test_core.py | 9 +++------ 2 files changed, 6 insertions(+), 7 deletions(-) diff --git a/supervision/metrics/core.py b/supervision/metrics/core.py index 3b4e699e..9c887c2c 100644 --- a/supervision/metrics/core.py +++ b/supervision/metrics/core.py @@ -164,7 +164,9 @@ class InternalMetricDataStore: ) -> Optional[npt.NDArray]: """Return boxes, masks or oriented bounding boxes from the data.""" if not isinstance(data, (Detections, np.ndarray)): - raise ValueError(f"Invalid data type: {type(data)}. Only Detections or np.ndarray are supported.") + raise ValueError( + f"Invalid data type: {type(data)}. Only Detections or np.ndarray are supported." + ) if isinstance(data, np.ndarray): return data diff --git a/test/metrics/test_core.py b/test/metrics/test_core.py index 1ab260b9..148d991a 100644 --- a/test/metrics/test_core.py +++ b/test/metrics/test_core.py @@ -1,4 +1,5 @@ -from contextlib import ExitStack as DoesNotRaise, AbstractContextManager as PytestExceptionType +from contextlib import AbstractContextManager as PytestExceptionType +from contextlib import ExitStack as DoesNotRaise from typing import List, Optional, Tuple, Union import numpy as np @@ -204,10 +205,7 @@ def test_store_boxes_by_class( ) -> None: with exception: helper_test_store( - data_1, - data_2, - class_agnostic=False, - expected_result=expected_result + data_1, data_2, class_agnostic=False, expected_result=expected_result ) @@ -243,4 +241,3 @@ def test_store_invalid_args( class_agnostic=False, expected_result=expected_result, ) -