mirror of
https://github.com/grillazz/fastapi-sqlalchemy-asyncpg.git
synced 2026-07-28 05:00:38 +03:00
refactor: add type hints to function signatures across multiple files
This commit is contained in:
+2
-1
@@ -1,3 +1,4 @@
|
||||
from starlette.templating import _TemplateResponse
|
||||
from contextlib import asynccontextmanager
|
||||
from pathlib import Path
|
||||
|
||||
@@ -79,7 +80,7 @@ def create_app() -> FastAPI:
|
||||
register_exception_handlers(app)
|
||||
|
||||
@app.get("/index", response_class=HTMLResponse)
|
||||
def get_index(request: Request):
|
||||
def get_index(request: Request) -> _TemplateResponse:
|
||||
return templates.TemplateResponse("index.html", {"request": request})
|
||||
|
||||
return app
|
||||
|
||||
Reference in New Issue
Block a user