Skip to content

Commit 2e44c75

Browse files
committed
refactor(mypy): simplify integer type for ruff and mypy
1 parent ad72726 commit 2e44c75

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

maestro/trainer/models/florence_2/detection.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -106,10 +106,10 @@ def detections_to_suffix_formatter(
106106
x_max /= width
107107
y_min /= height
108108
y_max /= height
109-
x_min_int = int(round(x_min * 1000))
110-
x_max_int = int(round(x_max * 1000))
111-
y_min_int = int(round(y_min * 1000))
112-
y_max_int = int(round(y_max * 1000))
109+
x_min_int: int = round(x_min * 1000)
110+
x_max_int: int = round(x_max * 1000)
111+
y_min_int: int = round(y_min * 1000)
112+
y_max_int: int = round(y_max * 1000)
113113
box_text = f"{cls_name}<loc_{x_min_int}><loc_{y_min_int}><loc_{x_max_int}><loc_{y_max_int}>"
114114
text_parts.append(box_text)
115115

0 commit comments

Comments
 (0)