From e68c908077bb8bf901478bc087458fd218abb69f Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Sat, 15 Nov 2025 20:29:32 +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/detection/vlm.py | 4 ++-- test/detection/test_vlm.py | 20 ++++++++++---------- 2 files changed, 12 insertions(+), 12 deletions(-) diff --git a/supervision/detection/vlm.py b/supervision/detection/vlm.py index 9892e40d..37182766 100644 --- a/supervision/detection/vlm.py +++ b/supervision/detection/vlm.py @@ -332,7 +332,7 @@ def from_qwen_2_5_vl( start = text.find("[") end = text.rfind("]") if start != -1 and end != -1 and end > start: - text = text[start: end + 1].strip() + text = text[start : end + 1].strip() try: data = json.loads(text) @@ -404,7 +404,7 @@ def from_qwen_3_vl( result=result, input_wh=(1000, 1000), resolution_wh=resolution_wh, - classes=classes + classes=classes, ) diff --git a/test/detection/test_vlm.py b/test/detection/test_vlm.py index e93b66f3..7bfc2313 100644 --- a/test/detection/test_vlm.py +++ b/test/detection/test_vlm.py @@ -320,7 +320,7 @@ def test_from_paligemma( np.array(["dog"], dtype=str), ), ), # out-of-bounds box -( + ( does_not_raise(), """[ {'bbox_2d': [10, 20, 110, 120], 'label': 'cat'} @@ -346,15 +346,15 @@ def test_from_paligemma( (640, 640), None, ( - np.array( - [ - [0.0, 0.0, 64.0, 64.0], - [10.0, 20.0, 110.0, 120.0], - ], - dtype=float, - ), - None, - np.array(["dog", "cat"], dtype=str), + np.array( + [ + [0.0, 0.0, 64.0, 64.0], + [10.0, 20.0, 110.0, 120.0], + ], + dtype=float, + ), + None, + np.array(["dog", "cat"], dtype=str), ), ), # truncated response, last object unfinished, previous ones recovered (