From 90850267d24ea0a5f3ee02f627b6fd41c08076c8 Mon Sep 17 00:00:00 2001 From: Nick Mowen Date: Fri, 29 Sep 2023 16:27:25 -0600 Subject: [PATCH] Formatting --- frigate/output.py | 5 ++++- frigate/test/test_birdseye.py | 2 +- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/frigate/output.py b/frigate/output.py index 9fdcb3e37..09c385dcf 100644 --- a/frigate/output.py +++ b/frigate/output.py @@ -51,6 +51,7 @@ def get_standard_aspect_ratio(width: int, height: int) -> tuple[int, int]: ) return known_aspects[known_aspects_ratios.index(closest)] + def get_canvas_shape(width: int, height: int) -> tuple[int, int]: """Get birdseye canvas shape.""" canvas_width = width @@ -60,7 +61,9 @@ def get_canvas_shape(width: int, height: int) -> tuple[int, int]: if round(a_w / a_h, 2) != round(width / height, 2): canvas_width = width canvas_height = (canvas_width / a_w) * a_h - logger.warning(f"The birdseye resolution is a non-standard aspect ratio, forcing birdseye resolution to {canvas_width} x {canvas_height}") + logger.warning( + f"The birdseye resolution is a non-standard aspect ratio, forcing birdseye resolution to {canvas_width} x {canvas_height}" + ) return (canvas_width, canvas_height) diff --git a/frigate/test/test_birdseye.py b/frigate/test/test_birdseye.py index 5dc4ff665..8c24b48ec 100644 --- a/frigate/test/test_birdseye.py +++ b/frigate/test/test_birdseye.py @@ -43,5 +43,5 @@ class TestBirdseye(unittest.TestCase): width = 1280 height = 840 canvas_width, canvas_height = get_canvas_shape(width, height) - assert canvas_width == width # width will be the same + assert canvas_width == width # width will be the same assert canvas_height != height