fix(lint): remove unused imports and extraneous f-string prefix
Ruff auto-fix: unused Optional imports in sectors router and link schemas, unused Site import in device service, unused datetime imports in trend detector, unused text import in site service, and f-string without placeholders in signal history service. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -11,7 +11,6 @@ RBAC:
|
||||
"""
|
||||
|
||||
import uuid
|
||||
from typing import Optional
|
||||
|
||||
from fastapi import APIRouter, Depends, status
|
||||
from pydantic import BaseModel
|
||||
|
||||
@@ -2,7 +2,6 @@
|
||||
|
||||
import uuid
|
||||
from datetime import datetime
|
||||
from typing import Optional
|
||||
|
||||
from pydantic import BaseModel, ConfigDict
|
||||
|
||||
|
||||
@@ -119,7 +119,6 @@ def _build_device_response(device: Device) -> DeviceResponse:
|
||||
|
||||
def _device_with_relations():
|
||||
"""Return a select() for Device with tags and groups eagerly loaded."""
|
||||
from app.models.site import Site # noqa: F811
|
||||
|
||||
return select(Device).options(
|
||||
selectinload(Device.tag_assignments).selectinload(DeviceTagAssignment.tag),
|
||||
|
||||
@@ -41,7 +41,7 @@ async def get_signal_history(
|
||||
bucket_interval, lookback = RANGE_CONFIG.get(range, RANGE_CONFIG["7d"])
|
||||
|
||||
result = await db.execute(
|
||||
text(f"""
|
||||
text("""
|
||||
SELECT
|
||||
time_bucket(:bucket_interval, wr.time) AS bucket,
|
||||
avg(wr.signal_strength)::int AS signal_avg,
|
||||
|
||||
@@ -8,7 +8,7 @@ import uuid
|
||||
|
||||
import structlog
|
||||
from fastapi import HTTPException, status
|
||||
from sqlalchemy import func, select, text, update
|
||||
from sqlalchemy import func, select, update
|
||||
from sqlalchemy.ext.asyncio import AsyncSession
|
||||
|
||||
from app.models.device import Device
|
||||
|
||||
@@ -10,7 +10,6 @@ Uses AdminAsyncSessionLocal (bypasses RLS -- trend detection is system-level).
|
||||
"""
|
||||
|
||||
import asyncio
|
||||
from datetime import datetime, timezone
|
||||
|
||||
import structlog
|
||||
from sqlalchemy import text
|
||||
|
||||
Reference in New Issue
Block a user