From 38b87d6098dcf2305cf5b50889f5a2e4226234cf Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Tue, 5 Dec 2023 12:46:33 +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/core.py | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) diff --git a/supervision/detection/core.py b/supervision/detection/core.py index 75fd0a9c..7e3c1409 100644 --- a/supervision/detection/core.py +++ b/supervision/detection/core.py @@ -1,7 +1,7 @@ from __future__ import annotations from dataclasses import astuple, dataclass -from typing import Any, Iterator, List, Optional, Tuple, Union, Dict +from typing import Any, Dict, Iterator, List, Optional, Tuple, Union import numpy as np @@ -486,9 +486,7 @@ class Detections: @classmethod def from_azure_analyze_image( - cls, - azure_result: dict, - class_map: Optional[Dict[int, str]] = None + cls, azure_result: dict, class_map: Optional[Dict[int, str]] = None ) -> Detections: """ Creates a Detections instance from Azure Image Analysis 4.0 @@ -531,11 +529,7 @@ class Detections: if is_dynamic_mapping: class_map = {} - class_map = { - value: key - for key, value - in class_map.items() - } + class_map = {value: key for key, value in class_map.items()} for detection in azure_result["objectsResult"]["values"]: bbox = detection["boundingBox"]