chore: ruff lint auto-fix — 9 errors fixed (import sorting, unused imports)
- I001: import block sorting in main.py, routes/__init__.py, companies.py, conftest.py, check_indexes.py - F401: unused imports removed (asyncio, UTC, datetime, AsyncSession) - 6 ASYNC240/230 warnings remain (os.path.exists in async, open() in test) — minor, non-blocking
This commit is contained in:
@@ -1,13 +1,13 @@
|
||||
"""Routes package."""
|
||||
|
||||
from app.routes import (
|
||||
metrics, # noqa: F401
|
||||
ai_copilot, # noqa: F401
|
||||
auth, # noqa: F401
|
||||
companies, # noqa: F401
|
||||
contacts, # noqa: F401
|
||||
health, # noqa: F401
|
||||
import_export, # noqa: F401
|
||||
metrics, # noqa: F401
|
||||
notifications, # noqa: F401
|
||||
plugins, # noqa: F401
|
||||
roles, # noqa: F401
|
||||
|
||||
@@ -75,12 +75,14 @@ async def export_companies(
|
||||
tenant_id = uuid.UUID(current_user["tenant_id"])
|
||||
|
||||
if format == "csv":
|
||||
from app.models.company import Company
|
||||
from sqlalchemy import select as sa_select
|
||||
from app.core.db import get_session_factory
|
||||
import csv
|
||||
import io
|
||||
|
||||
from fastapi.responses import StreamingResponse
|
||||
from sqlalchemy import select as sa_select
|
||||
|
||||
from app.core.db import get_session_factory
|
||||
from app.models.company import Company
|
||||
|
||||
async def generate_csv():
|
||||
"""Async generator yielding CSV rows (streaming, not buffered).
|
||||
|
||||
@@ -2,7 +2,6 @@
|
||||
|
||||
from __future__ import annotations
|
||||
|
||||
import asyncio
|
||||
import csv
|
||||
import io
|
||||
import uuid
|
||||
|
||||
Reference in New Issue
Block a user