chore: fix all ruff lint errors + format — 0 errors, 306 tests pass

This commit is contained in:
leocrm-bot
2026-06-29 17:43:56 +02:00
parent 316f323ff4
commit a2452cc04b
81 changed files with 2317 additions and 1128 deletions
+13 -6
View File
@@ -7,12 +7,11 @@ import uuid
from fastapi import APIRouter, Depends, HTTPException, Query, status
from sqlalchemy.ext.asyncio import AsyncSession
from app.core.auth import check_permission
from app.core.db import get_db
from app.deps import get_current_user
from app.schemas.ai_copilot import (
CopilotQueryRequest,
CopilotExecuteRequest,
CopilotQueryRequest,
)
from app.services import ai_copilot_service
@@ -34,7 +33,9 @@ async def copilot_query(
user_id = uuid.UUID(current_user["user_id"])
result = await ai_copilot_service.process_query(
db, tenant_id, user_id,
db,
tenant_id,
user_id,
query=body.query,
conversation_id=body.conversation_id,
context=body.context,
@@ -65,7 +66,10 @@ async def copilot_execute(
role = current_user.get("role", "viewer")
result = await ai_copilot_service.execute_action(
db, tenant_id, user_id, role,
db,
tenant_id,
user_id,
role,
conversation_id=body.conversation_id,
action=body.action.model_dump(),
)
@@ -97,6 +101,9 @@ async def copilot_history(
user_id = uuid.UUID(current_user["user_id"])
return await ai_copilot_service.get_history(
db, tenant_id, user_id,
page=page, page_size=page_size,
db,
tenant_id,
user_id,
page=page,
page_size=page_size,
)