refactor: remove all inline comments from code

This commit is contained in:
2026-04-25 18:57:05 +03:00
parent bc1b914476
commit c85e981dc5
9 changed files with 2 additions and 144 deletions

View File

@@ -1,5 +1,3 @@
"""FastAPI application factory and entry point."""
from contextlib import asynccontextmanager
import uvicorn
@@ -11,32 +9,18 @@ from app.core.config import settings
@asynccontextmanager
async def lifespan(app: FastAPI):
"""Application lifespan manager for startup/shutdown events."""
# Startup: initialize DB connections, cache, etc.
yield
# Shutdown: cleanup resources
def app_factory() -> FastAPI:
"""Create and configure FastAPI application instance.
Returns:
Configured FastAPI application.
"""
app = FastAPI(title=settings.app_name, debug=settings.debug, lifespan=lifespan)
# Register exception handlers
register_exception_handlers(app)
# Register routers (when added)
# from app.api.v1.router import api_router
# app.include_router(api_router, prefix="/api/v1")
return app
def main():
"""Run the application with uvicorn server."""
uvicorn.run(app_factory, factory=True, host=settings.host, port=settings.port)