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:
@@ -5,7 +5,6 @@ from __future__ import annotations
|
||||
import logging
|
||||
import random
|
||||
import uuid
|
||||
from typing import Any
|
||||
|
||||
from sqlalchemy.ext.asyncio import AsyncSession
|
||||
|
||||
@@ -83,7 +82,7 @@ async def compare_prices(
|
||||
|
||||
# Calculate average price
|
||||
if listings:
|
||||
average_price = round(sum(l.price for l in listings) / len(listings), 2)
|
||||
average_price = round(sum(listing.price for listing in listings) / len(listings), 2)
|
||||
else:
|
||||
average_price = None
|
||||
|
||||
|
||||
Reference in New Issue
Block a user