Fix lint errors
This commit is contained in:
@@ -1,6 +1,10 @@
|
||||
"""Main application entry point and FastAPI app configuration."""
|
||||
|
||||
import logging
|
||||
from collections.abc import AsyncIterator
|
||||
from contextlib import asynccontextmanager
|
||||
|
||||
import uvicorn
|
||||
from fastapi import FastAPI
|
||||
from fastapi.middleware.cors import CORSMiddleware
|
||||
|
||||
@@ -17,7 +21,7 @@ logger = logging.getLogger(__name__)
|
||||
|
||||
|
||||
@asynccontextmanager
|
||||
async def lifespan(_: FastAPI):
|
||||
async def lifespan(_: FastAPI) -> AsyncIterator[None]:
|
||||
"""Application lifespan manager."""
|
||||
# Startup
|
||||
logger.info("Initializing services...")
|
||||
@@ -35,7 +39,9 @@ async def lifespan(_: FastAPI):
|
||||
|
||||
app = FastAPI(
|
||||
title="Capa de Integración - Orchestrator Service",
|
||||
description="Conversational AI orchestrator for Dialogflow CX, Gemini, and Vertex AI",
|
||||
description=(
|
||||
"Conversational AI orchestrator for Dialogflow CX, Gemini, and Vertex AI"
|
||||
),
|
||||
version="0.1.0",
|
||||
lifespan=lifespan,
|
||||
)
|
||||
@@ -58,18 +64,16 @@ app.include_router(quick_replies_router)
|
||||
|
||||
|
||||
@app.get("/health")
|
||||
async def health_check():
|
||||
async def health_check() -> dict[str, str]:
|
||||
"""Health check endpoint."""
|
||||
return {"status": "healthy", "service": "capa-de-integracion"}
|
||||
|
||||
|
||||
def main() -> None:
|
||||
"""Entry point for CLI."""
|
||||
import uvicorn
|
||||
|
||||
uvicorn.run(
|
||||
"capa_de_integracion.main:app",
|
||||
host="0.0.0.0",
|
||||
host="0.0.0.0", # noqa: S104
|
||||
port=8080,
|
||||
reload=True,
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user