From cb34ac5026774c20d61ed51580b5f518b8f4c5e4 Mon Sep 17 00:00:00 2001 From: Nicolas Mowen Date: Wed, 3 Apr 2024 14:59:14 -0600 Subject: [PATCH] Formatting --- frigate/api/app.py | 6 +++--- frigate/stats/emitter.py | 8 ++++++-- 2 files changed, 9 insertions(+), 5 deletions(-) diff --git a/frigate/api/app.py b/frigate/api/app.py index 7810c0b21..d307e9384 100644 --- a/frigate/api/app.py +++ b/frigate/api/app.py @@ -157,9 +157,9 @@ def config(): config["plus"] = {"enabled": current_app.plus_api.is_active()} for detector, detector_config in config["detectors"].items(): - detector_config["model"][ - "labelmap" - ] = current_app.frigate_config.model.merged_labelmap + detector_config["model"]["labelmap"] = ( + current_app.frigate_config.model.merged_labelmap + ) return jsonify(config) diff --git a/frigate/stats/emitter.py b/frigate/stats/emitter.py index a2d04a2ae..2c29548e9 100644 --- a/frigate/stats/emitter.py +++ b/frigate/stats/emitter.py @@ -48,7 +48,9 @@ class StatsEmitter(threading.Thread): self.stats_history.append(stats) return stats - def get_stats_history(self, keys: Optional[list[str]] = None) -> list[dict[str, any]]: + def get_stats_history( + self, keys: Optional[list[str]] = None + ) -> list[dict[str, any]]: """Get stats history.""" if not keys: return self.stats_history @@ -67,7 +69,9 @@ class StatsEmitter(threading.Thread): def run(self) -> None: time.sleep(10) - for counter in itertools.cycle(range(int(self.config.mqtt.stats_interval / 10))): + for counter in itertools.cycle( + range(int(self.config.mqtt.stats_interval / 10)) + ): if self.stop_event.wait(10): break