From 11330b8de508746cf5e7b5633276cb68b9e43d79 Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Mon, 13 Jul 2026 06:31:46 +0000 Subject: [PATCH] [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --- studio/backend/routes/models.py | 4 +--- studio/backend/tests/test_sd_cpp_backend.py | 7 ++++++- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/studio/backend/routes/models.py b/studio/backend/routes/models.py index d1337e4210..f9a6e5833c 100644 --- a/studio/backend/routes/models.py +++ b/studio/backend/routes/models.py @@ -344,9 +344,7 @@ def _scan_models_dir(models_dir: Path, *, limit: int | None = None) -> List[Loca # local pipeline dir, so admit it here too (task tagging then classifies it via # _local_is_diffusers); otherwise it is hidden from the On Device picker. has_pipeline_index = (child / "model_index.json").is_file() - has_model_files = ( - has_gguf or has_non_gguf_weights or has_config or has_pipeline_index - ) + has_model_files = has_gguf or has_non_gguf_weights or has_config or has_pipeline_index except OSError: # Skip unreadable children rather than failing the scan. continue diff --git a/studio/backend/tests/test_sd_cpp_backend.py b/studio/backend/tests/test_sd_cpp_backend.py index 1cb01df417..40a20a58a2 100644 --- a/studio/backend/tests/test_sd_cpp_backend.py +++ b/studio/backend/tests/test_sd_cpp_backend.py @@ -292,7 +292,12 @@ def test_generate_publishes_progress_before_lora_resolution(monkeypatch): seen: dict = {} - def _resolve(active, *, hf_token = None, cancel_event = None): + def _resolve( + active, + *, + hf_token = None, + cancel_event = None, + ): # Mid-setup: the in-flight generation must already be reported as active. seen["progress"] = b.generate_progress() return []