From 851cb2af6838244f72ccec48e4fb0c4a7b63d531 Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Sun, 15 Mar 2026 07:58:29 +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 | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/studio/backend/routes/models.py b/studio/backend/routes/models.py index 1331aa5fd3..6b54faa0a9 100644 --- a/studio/backend/routes/models.py +++ b/studio/backend/routes/models.py @@ -649,7 +649,11 @@ async def get_gguf_download_progress( break total_progress_bytes = downloaded_bytes + in_progress_bytes - progress = min(total_progress_bytes / expected_bytes, 0.99) if expected_bytes > 0 else 0 + progress = ( + min(total_progress_bytes / expected_bytes, 0.99) + if expected_bytes > 0 + else 0 + ) # Only report 1.0 when all bytes are in completed files (not in-progress) if expected_bytes > 0 and downloaded_bytes >= expected_bytes: progress = 1.0