@@ -359,14 +359,14 @@ def draw_bounding_boxes(
359
359
f"Number of boxes ({ num_boxes } ) and labels ({ len (labels )} ) mismatch. Please specify labels for each box."
360
360
)
361
361
362
- colors = _parse_colors (colors , num_objects = num_boxes )
362
+ colors = _parse_colors (colors , num_objects = num_boxes ) # type: ignore[assignment]
363
363
if label_colors or fill_labels :
364
364
label_colors = _parse_colors (label_colors if label_colors else "black" , num_objects = num_boxes ) # type: ignore[assignment]
365
365
else :
366
366
label_colors = colors .copy () # type: ignore[assignment]
367
367
368
368
if fill_labels and label_background_colors :
369
- label_background_colors = _parse_colors (label_background_colors , num_objects = num_boxes )
369
+ label_background_colors = _parse_colors (label_background_colors , num_objects = num_boxes ) # type: ignore[assignment]
370
370
else :
371
371
label_background_colors = colors .copy () # type: ignore[assignment]
372
372
@@ -404,7 +404,7 @@ def draw_bounding_boxes(
404
404
if fill_labels :
405
405
left , top , right , bottom = draw .textbbox ((bbox [0 ] + margin , bbox [1 ] + margin ), label , font = txt_font )
406
406
draw .rectangle (
407
- (left - box_margin , top - box_margin , right + box_margin , bottom + box_margin ), fill = label_bg_color
407
+ (left - box_margin , top - box_margin , right + box_margin , bottom + box_margin ), fill = label_bg_color # type: ignore[arg-type]
408
408
)
409
409
draw .text ((bbox [0 ] + margin , bbox [1 ] + margin ), label , fill = label_color , font = txt_font ) # type: ignore[arg-type]
410
410
0 commit comments