fix(data-ana): ruff 自动修复代码风格

This commit is contained in:
SpecialX
2026-07-08 12:52:33 +08:00
parent 3961a36308
commit 4fea3de1d1
3 changed files with 9 additions and 4 deletions

View File

@@ -1,5 +1,7 @@
"""ClickHouse 客户端."""
import clickhouse_connect
from .config import settings
_client = None

View File

@@ -1,12 +1,14 @@
"""数据分析服务入口."""
from contextlib import asynccontextmanager
import structlog
from fastapi import FastAPI
from opentelemetry import trace
from opentelemetry.exporter.otlp.proto.http.trace_exporter import OTLPSpanExporter
from opentelemetry.sdk.trace import TracerProvider
from opentelemetry.sdk.trace.export import BatchSpanProcessor
from opentelemetry.exporter.otlp.proto.http.trace_exporter import OTLPSpanExporter
from prometheus_client import make_asgi_app
import structlog
logger = structlog.get_logger()
tracer = trace.get_tracer(__name__)

View File

@@ -8,7 +8,8 @@
from health import router as health_router
app.include_router(health_router)
"""
from datetime import datetime, timezone
from datetime import UTC, datetime
from fastapi import APIRouter
@@ -30,5 +31,5 @@ async def readyz() -> dict:
return {
"status": "ok",
"service": SERVICE_NAME,
"timestamp": datetime.now(timezone.utc).isoformat(),
"timestamp": datetime.now(UTC).isoformat(),
}