mirror of
https://github.com/blakeblackshear/frigate.git
synced 2026-05-01 19:17:41 +03:00
Add ruff formatting
This commit is contained in:
parent
8327601c4b
commit
646f138063
@ -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)
|
||||
|
||||
@ -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),
|
||||
|
||||
Loading…
Reference in New Issue
Block a user