fix: ruff lint + format fixes in tests, ESLint fixes in frontend

This commit is contained in:
2026-07-17 21:28:58 +02:00
parent 341d0c6f38
commit fbb1b39b57
56 changed files with 1399 additions and 721 deletions
+25 -4
View File
@@ -2,7 +2,16 @@
import uuid
from fastapi import APIRouter, BackgroundTasks, Depends, File, Form, HTTPException, UploadFile, status
from fastapi import (
APIRouter,
BackgroundTasks,
Depends,
File,
Form,
HTTPException,
UploadFile,
status,
)
from sqlalchemy.ext.asyncio import AsyncSession
from app.config import settings
@@ -79,7 +88,12 @@ async def process_image(
except (ValueError, TypeError):
raise HTTPException(
status_code=status.HTTP_422_UNPROCESSABLE_ENTITY,
detail={"error": {"code": "INVALID_VEHICLE_ID", "message": "Invalid vehicle UUID"}},
detail={
"error": {
"code": "INVALID_VEHICLE_ID",
"message": "Invalid vehicle UUID",
}
},
)
# Fetch vehicle info for better retouch prompt
@@ -112,7 +126,9 @@ async def process_image(
return RetouchProcessResponse(
message="Retouch processing queued",
retouch_id=result.id,
status=result.status.value if isinstance(result.status, RetouchStatus) else str(result.status),
status=result.status.value
if isinstance(result.status, RetouchStatus)
else str(result.status),
)
@@ -136,7 +152,12 @@ async def get_retouch_result(
if result is None:
raise HTTPException(
status_code=status.HTTP_404_NOT_FOUND,
detail={"error": {"code": "RETOUCH_NOT_FOUND", "message": "Retouch result not found"}},
detail={
"error": {
"code": "RETOUCH_NOT_FOUND",
"message": "Retouch result not found",
}
},
)
return RetouchResultResponse.model_validate(result)