From 499bada598ebbc4d1280a8152d92fb0f0af749f5 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 01:23:42 +0000 Subject: [PATCH] [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --- studio/backend/tests/test_diffusion_backend.py | 4 ++-- studio/backend/tests/test_diffusion_engine_router.py | 4 +--- studio/backend/tests/test_diffusion_routes.py | 7 ++++++- 3 files changed, 9 insertions(+), 6 deletions(-) diff --git a/studio/backend/tests/test_diffusion_backend.py b/studio/backend/tests/test_diffusion_backend.py index 0f8b84f083..477577ba35 100644 --- a/studio/backend/tests/test_diffusion_backend.py +++ b/studio/backend/tests/test_diffusion_backend.py @@ -3030,8 +3030,8 @@ def test_unload_waits_for_in_flight_denoise_before_teardown(): with backend._generate_lock: denoise_active["v"] = True started.set() - cancel.wait(2.0) # unload signals this - finish.wait(2.0) # the test lets us finish + cancel.wait(2.0) # unload signals this + finish.wait(2.0) # the test lets us finish denoise_active["v"] = False # about to release _generate_lock def _fake_unload_locked(): diff --git a/studio/backend/tests/test_diffusion_engine_router.py b/studio/backend/tests/test_diffusion_engine_router.py index 53d40a1336..4ff9bc23c7 100644 --- a/studio/backend/tests/test_diffusion_engine_router.py +++ b/studio/backend/tests/test_diffusion_engine_router.py @@ -258,9 +258,7 @@ def test_activate_serializes_switch_and_concurrent_query(monkeypatch): unload_started.set() release_unload.wait(2.0) - engine = SimpleNamespace( - status = lambda: {"loaded": False, "repo_id": None}, unload = _slow_unload - ) + engine = SimpleNamespace(status = lambda: {"loaded": False, "repo_id": None}, unload = _slow_unload) monkeypatch.setattr(r, "get_active_diffusion_engine", lambda: engine) switch_done = threading.Event() diff --git a/studio/backend/tests/test_diffusion_routes.py b/studio/backend/tests/test_diffusion_routes.py index 6e6f7ea2da..34b4061fd0 100644 --- a/studio/backend/tests/test_diffusion_routes.py +++ b/studio/backend/tests/test_diffusion_routes.py @@ -180,7 +180,12 @@ def client(monkeypatch, tmp_path): monkeypatch.setattr(gallery_module, "save", _save) monkeypatch.setattr(gallery_module, "image_b64", lambda i: "QUJD" if i in store else None) - def _list_images(limit = None, offset = 0, *, valid = None): + def _list_images( + limit = None, + offset = 0, + *, + valid = None, + ): ordered = sorted(store.values(), key = lambda r: r.get("created_at", 0.0), reverse = True) if valid is not None: ordered = [r for r in ordered if valid(r)]