Formatting

This commit is contained in:
Nicolas Mowen 2024-04-03 14:59:14 -06:00
parent ad85df4c31
commit cb34ac5026
2 changed files with 9 additions and 5 deletions

View File

@ -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)

View File

@ -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