From f60e8ee76e404bbe30574500f8000286e75102e8 Mon Sep 17 00:00:00 2001 From: Martin Weinelt Date: Tue, 13 May 2025 05:44:39 +0200 Subject: [PATCH] Account for floating point results in to_relative_box Because the function uses division the return types may either be int or float. --- frigate/util/builtin.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/frigate/util/builtin.py b/frigate/util/builtin.py index 30cd6c8b7..f8e04a033 100644 --- a/frigate/util/builtin.py +++ b/frigate/util/builtin.py @@ -169,7 +169,7 @@ def get_tz_modifiers(tz_name: str) -> Tuple[str, str, float]: def to_relative_box( width: int, height: int, box: Tuple[int, int, int, int] -) -> Tuple[int, int, int, int]: +) -> Tuple[int | float, int | float, int | float, int | float]: return ( box[0] / width, # x box[1] / height, # y