From eabeff5aea558e10aeaeb396df9856cbba6b3f19 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 12:30:24 +0000 Subject: [PATCH] [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --- studio/backend/hub/services/models/cache_inventory.py | 3 +-- studio/backend/routes/inference.py | 4 +--- 2 files changed, 2 insertions(+), 5 deletions(-) diff --git a/studio/backend/hub/services/models/cache_inventory.py b/studio/backend/hub/services/models/cache_inventory.py index b7a42283a0..3155e36608 100644 --- a/studio/backend/hub/services/models/cache_inventory.py +++ b/studio/backend/hub/services/models/cache_inventory.py @@ -586,8 +586,7 @@ def _weightful_snapshot_path(repo_path: Path) -> Optional[Path]: non-GGUF resolvers' complete-revision predicate).""" return _newest_snapshot_where( repo_path, - lambda names: "config.json" in names - and any(n.endswith(".safetensors") for n in names), + lambda names: "config.json" in names and any(n.endswith(".safetensors") for n in names), ) diff --git a/studio/backend/routes/inference.py b/studio/backend/routes/inference.py index 6213788a2f..474b2a5f03 100644 --- a/studio/backend/routes/inference.py +++ b/studio/backend/routes/inference.py @@ -5168,9 +5168,7 @@ async def _load_model_impl( # (which performs no offline-mode check). GGUF sizing already reads # the cached file under its own local-only handling. _guard_identifier = ( - config.path - if request.local_files_only and not config.is_gguf - else model_identifier + config.path if request.local_files_only and not config.is_gguf else model_identifier ) await asyncio.to_thread( _guard_chat_load_against_training,