Skip to content

Commit 19ae698

Browse files
short circuit if stmt
1 parent 3503a63 commit 19ae698

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

torchvision/utils.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -365,8 +365,8 @@ def draw_bounding_boxes(
365365
else:
366366
label_colors = colors.copy() # type: ignore[assignment]
367367

368-
if fill_labels:
369-
label_background_colors = _parse_colors(label_background_colors, num_objects=num_boxes) if label_background_colors else colors.copy() # type: ignore[assignment]
368+
if fill_labels and label_background_colors:
369+
label_background_colors = _parse_colors(label_background_colors, num_objects=num_boxes)
370370
else:
371371
label_background_colors = colors.copy() # type: ignore[assignment]
372372

0 commit comments

Comments
 (0)