fix(pre_commit): 🎨 auto format pre-commit hooks

This commit is contained in:
pre-commit-ci[bot] 2024-08-12 11:10:53 +00:00
parent 3e860a5449
commit a4cf2604ee
2 changed files with 6 additions and 7 deletions

View File

@ -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

View File

@ -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,
)