mirror of
https://github.com/home-assistant/core.git
synced 2025-07-30 10:48:01 +02:00
Update string formatting to use f-string on components (#125987)
* Update string formatting to use f-string on components * Update code given review feedback * Use f-string --------- Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
This commit is contained in:
@ -324,7 +324,7 @@ class TensorFlowImageProcessor(ImageProcessingEntity):
|
||||
|
||||
# Draw detected objects
|
||||
for instance in values:
|
||||
label = "{} {:.1f}%".format(category, instance["score"])
|
||||
label = f"{category} {instance['score']:.1f}%"
|
||||
draw_box(
|
||||
draw, instance["box"], img_width, img_height, label, (255, 255, 0)
|
||||
)
|
||||
|
Reference in New Issue
Block a user