Skip to content

Commit 0c8a9d3

Browse files
authored
Merge pull request #1906 from roboflow/fix/border_thickness
fix: border thickness parameter usage for `PercentageBarAnnotator`
2 parents d251677 + d067f32 commit 0c8a9d3

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

supervision/annotators/core.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2239,8 +2239,11 @@ def __init__(
22392239
self.position: Position = position
22402240
self.color_lookup: ColorLookup = color_lookup
22412241

2242-
if border_thickness is None:
2243-
self.border_thickness = int(0.15 * self.height)
2242+
self.border_thickness = (
2243+
border_thickness
2244+
if border_thickness is not None
2245+
else int(0.15 * self.height)
2246+
)
22442247

22452248
@ensure_cv2_image_for_annotation
22462249
def annotate(

0 commit comments

Comments
 (0)