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

This commit is contained in:
pre-commit-ci[bot]
2025-04-17 00:48:27 +00:00
parent 0539ec9d1f
commit c68218a07e
2 changed files with 12 additions and 9 deletions
+6 -5
View File
@@ -1375,10 +1375,12 @@ class LabelAnnotator(_BaseLabelAnnotator):
position=self.text_anchor,
)
label_properties.append([
*text_background_xyxy,
total_height,
])
label_properties.append(
[
*text_background_xyxy,
total_height,
]
)
return np.array(label_properties).reshape(-1, 5)
def _draw_labels(
@@ -1704,7 +1706,6 @@ class RichLabelAnnotator(_BaseLabelAnnotator):
return load_default_font(font_size)
class IconAnnotator(BaseAnnotator):
"""
A class for drawing an icon on an image, using provided detections.
+6 -4
View File
@@ -1214,10 +1214,12 @@ def cross_product(anchors: np.ndarray, vector: Vector) -> np.ndarray:
Returns:
Array of cross products of shape (number of anchors, detections)
"""
vector_at_zero = np.array([
vector.end.x - vector.start.x,
vector.end.y - vector.start.y,
])
vector_at_zero = np.array(
[
vector.end.x - vector.start.x,
vector.end.y - vector.start.y,
]
)
vector_start = np.array([vector.start.x, vector.start.y])
return np.cross(vector_at_zero, anchors - vector_start)