[pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci
This commit is contained in:
pre-commit-ci[bot] 2026-05-25 08:12:29 +00:00
commit 72ec67034c
3 changed files with 5 additions and 12 deletions

View file

@ -1006,6 +1006,7 @@ class DiffusionBackend:
import re
exc_msg = re.sub(r"hf_[A-Za-z0-9]{20,}", "<redacted>", exc_msg)
# Round 17 P2 #9: diffusers / safetensors raise errors
# like ``FileNotFoundError: /home/alice/models/foo.gguf``
# or ``OSError: Error while loading state dict from

View file

@ -344,9 +344,7 @@ async def _validation_error_scrubbing_handler(request, exc):
# Path objects, Url instances, etc.) into JSON-safe primitives.
return _JSONResponse(
status_code = 422,
content = _jsonable_encoder(
{"detail": _scrub_validation_obj(exc.errors())}
),
content = _jsonable_encoder({"detail": _scrub_validation_obj(exc.errors())}),
)

View file

@ -501,9 +501,7 @@ async def _release_export_for(workload: str) -> None:
try:
exp = get_export_backend()
except Exception as exc:
logger.warning(
"Could not access export backend before %s: %s", workload, exc
)
logger.warning("Could not access export backend before %s: %s", workload, exc)
raise HTTPException(
status_code = 503,
detail = (
@ -537,9 +535,7 @@ async def _release_export_for(workload: str) -> None:
)
await asyncio.to_thread(exp._shutdown_subprocess)
except Exception as exc:
logger.warning(
"Could not shut down export for %s: %s", workload, exc
)
logger.warning("Could not shut down export for %s: %s", workload, exc)
raise HTTPException(
status_code = 503,
detail = (
@ -573,9 +569,7 @@ async def _release_diffusion_for(workload: str) -> None:
try:
diff_status = diff_backend.status()
except Exception as exc:
logger.warning(
"Could not verify diffusion status before %s: %s", workload, exc
)
logger.warning("Could not verify diffusion status before %s: %s", workload, exc)
raise HTTPException(
status_code = 503,
detail = (