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:
Jason Staack
2026-03-19 13:45:47 -05:00
parent 26d419858a
commit 9d6b68760f
6 changed files with 2 additions and 6 deletions
-1
View File
@@ -11,7 +11,6 @@ RBAC:
"""
import uuid
from typing import Optional
from fastapi import APIRouter, Depends, status
from pydantic import BaseModel
-1
View File
@@ -2,7 +2,6 @@
import uuid
from datetime import datetime
from typing import Optional
from pydantic import BaseModel, ConfigDict
-1
View File
@@ -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,
+1 -1
View File
@@ -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
-1
View File
@@ -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