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
+4 -4
View File
@@ -98,7 +98,9 @@ async def upload_file(
"""
# Validate MIME type
if not validate_mime_type(mime_type, original_filename):
raise ValueError(f"Unsupported MIME type: {mime_type} for file: {original_filename}")
raise ValueError(
f"Unsupported MIME type: {mime_type} for file: {original_filename}"
)
# Validate file size (20MB limit for uploads)
file_size = len(file_content)
@@ -173,9 +175,7 @@ async def list_files(
Returns (files, total_count).
"""
# Count total files for this vehicle
count_stmt = select(func.count(File.id)).where(
File.vehicle_id == vehicle_id
)
count_stmt = select(func.count(File.id)).where(File.vehicle_id == vehicle_id)
count_result = await db.execute(count_stmt)
total = count_result.scalar_one()