@@ -359,14 +359,14 @@ def draw_bounding_boxes(
359359 f"Number of boxes ({ num_boxes } ) and labels ({ len (labels )} ) mismatch. Please specify labels for each box."
360360 )
361361
362- colors = _parse_colors (colors , num_objects = num_boxes )
362+ colors = _parse_colors (colors , num_objects = num_boxes ) # type: ignore[assignment]
363363 if label_colors or fill_labels :
364364 label_colors = _parse_colors (label_colors if label_colors else "black" , num_objects = num_boxes ) # type: ignore[assignment]
365365 else :
366366 label_colors = colors .copy () # type: ignore[assignment]
367367
368368 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]
370370 else :
371371 label_background_colors = colors .copy () # type: ignore[assignment]
372372
@@ -404,7 +404,7 @@ def draw_bounding_boxes(
404404 if fill_labels :
405405 left , top , right , bottom = draw .textbbox ((bbox [0 ] + margin , bbox [1 ] + margin ), label , font = txt_font )
406406 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]
408408 )
409409 draw .text ((bbox [0 ] + margin , bbox [1 ] + margin ), label , fill = label_color , font = txt_font ) # type: ignore[arg-type]
410410
0 commit comments