fix: resolve all ruff and ESLint lint errors

Backend (ruff):
- F821: Add TYPE_CHECKING imports for Vehicle, Contact, File in models
  (file.py, retouch.py, sale.py, vehicle.py)
- E741: Rename ambiguous variable  to /
  (copilot_service.py, price_compare_service.py, openrouter.py)
- F841: Remove unused variable  in sale_service.py

Frontend (ESLint):
- react/no-unescaped-entities: Escape quotes in ContractPreview.tsx
- @next/next/no-img-element: Replace <img> with <Image> from next/image
  (FileGallery.tsx, FileList.tsx, FilePreview.tsx, BeforeAfterSlider.tsx)

Tests: 392 backend passed, 112 frontend passed, next build successful
This commit is contained in:
2026-07-17 21:16:38 +02:00
parent f1d6de0e47
commit 341d0c6f38
30 changed files with 4078 additions and 48 deletions
+1 -3
View File
@@ -3,8 +3,7 @@
from __future__ import annotations
import uuid
from datetime import date, datetime, timezone
from decimal import Decimal
from datetime import date
from typing import Any
from sqlalchemy import and_, func, select
@@ -26,7 +25,6 @@ async def create_sale(db: AsyncSession, data: dict[str, Any]) -> Sale:
Raises ValueError if vehicle or buyer contact not found.
"""
vehicle_id = data["vehicle_id"]
buyer_contact_id = data["buyer_contact_id"]
# Verify vehicle exists
vehicle = await db.get(Vehicle, vehicle_id)