From da7c5cd65ab58915793f6c50081d53a3cbeaf956 Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Thu, 6 Nov 2025 21:57:23 +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 --- test/detection/utils/test_iou_and_nms.py | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/test/detection/utils/test_iou_and_nms.py b/test/detection/utils/test_iou_and_nms.py index 6536d29c..765bc5a2 100644 --- a/test/detection/utils/test_iou_and_nms.py +++ b/test/detection/utils/test_iou_and_nms.py @@ -6,7 +6,6 @@ import numpy as np import pytest from supervision.detection.utils.iou_and_nms import ( - OverlapMetric, _group_overlapping_boxes, box_iou, box_iou_batch, @@ -718,23 +717,21 @@ def test_box_iou_batch_consistency_with_box_iou(): for i, box_true in enumerate(boxes_true): for j, box_detection in enumerate(boxes_detection): single_result = box_iou(box_true, box_detection) - assert np.allclose( - batch_result[i, j], single_result, rtol=1e-5, atol=1e-5 - ) + assert np.allclose(batch_result[i, j], single_result, rtol=1e-5, atol=1e-5) def test_box_iou_batch_with_mock_detections(): - """ Test box_iou_batch with generated boxes and verify results are valid. """ + """Test box_iou_batch with generated boxes and verify results are valid.""" boxes_true = np.array(mock_boxes(10, seed=1), dtype=np.float32) boxes_detection = np.array(mock_boxes(15, seed=2), dtype=np.float32) result = box_iou_batch(boxes_true, boxes_detection) assert result.shape == (10, 15) - + assert np.all(result >= 0) assert np.all(result <= 1.0) - + # and symetric result_reversed = box_iou_batch(boxes_detection, boxes_true) assert result_reversed.shape == (15, 10)