Add ruff formatting

This commit is contained in:
Thomas A 2025-05-24 21:25:33 +02:00
parent 8327601c4b
commit 646f138063
2 changed files with 4 additions and 4 deletions

View File

@ -514,7 +514,9 @@ class FrigateConfig(FrigateBaseModel):
# If using a local file, verify that the model path points to an existing file.
if not model_config["path"].startswith("plus://"):
if not os.path.exists(model_config["path"]):
raise ValueError(f"Model path '{model_config['path']}' does not exist.")
raise ValueError(
f"Model path '{model_config['path']}' does not exist."
)
model = ModelConfig.model_validate(model_config)
model.check_and_load_plus_model(self.plus_api, detector_config.type)

View File

@ -108,9 +108,7 @@ class ModelConfig(BaseModel):
# If using a local file, verify that the labelmap path points to an existing file.
if not path.startswith("plus://"):
if not os.path.exists(path):
raise ValueError(
f"Model labelmap_path '{path}' does not exist."
)
raise ValueError(f"Model labelmap_path '{path}' does not exist.")
self._merged_labelmap = {
**load_labels(path),