From 370195c702f8560ed65f0249065be53115d269df Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Mon, 27 Jul 2026 05:00:11 +0000 Subject: [PATCH] [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --- studio/backend/hub/utils/local_snapshot.py | 4 +--- studio/backend/routes/inference.py | 6 +++++- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/studio/backend/hub/utils/local_snapshot.py b/studio/backend/hub/utils/local_snapshot.py index 3a3f8e12cb..da37bc8ab2 100644 --- a/studio/backend/hub/utils/local_snapshot.py +++ b/studio/backend/hub/utils/local_snapshot.py @@ -28,9 +28,7 @@ def _snapshot_dir_fallback(repo_id: str, cache_dir: Optional[str]) -> Optional[s ] except OSError: return None - candidates = [ - rev for rev in revisions if os.path.isfile(os.path.join(rev, "config.json")) - ] + candidates = [rev for rev in revisions if os.path.isfile(os.path.join(rev, "config.json"))] if not candidates: return None return max(candidates, key = os.path.getmtime) diff --git a/studio/backend/routes/inference.py b/studio/backend/routes/inference.py index c56c75bbb6..a2c218269e 100644 --- a/studio/backend/routes/inference.py +++ b/studio/backend/routes/inference.py @@ -5152,7 +5152,11 @@ async def validate_model( # Same audio gate as /load: non-GGUF audio models pull codec repos at # load time, so a local-only candidate is rejected here before the # frontend burns a load attempt on it. - if request.local_files_only and not getattr(config, "is_gguf", False) and getattr(config, "is_audio", False): + if ( + request.local_files_only + and not getattr(config, "is_gguf", False) + and getattr(config, "is_audio", False) + ): raise HTTPException( status_code = 409, detail = (