Skip to content

Commit e9cb5f3

Browse files
committed
fix mypy
1 parent da8b4d7 commit e9cb5f3

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/idom/server/fastapi.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -88,14 +88,14 @@ def _setup_application_did_start_event(
8888
self, config: Config, app: FastAPI, event: Event
8989
) -> None:
9090
@app.on_event("startup")
91-
async def startup_event():
91+
async def startup_event() -> None:
9292
self._loop = asyncio.get_event_loop()
9393
event.set()
9494

9595
def _setup_api_router(self, config: Config, router: APIRouter) -> None:
9696
"""Add routes to the application blueprint"""
9797

98-
@router.websocket("/stream") # type: ignore
98+
@router.websocket("/stream")
9999
async def model_stream(socket: WebSocket) -> None:
100100
await socket.accept()
101101

@@ -130,7 +130,7 @@ def _setup_static_files(self, config: Config, app: FastAPI) -> None:
130130
if config["redirect_root_to_index"]:
131131

132132
@app.route(f"{url_prefix}/")
133-
def redirect_to_index(request: Request):
133+
def redirect_to_index(request: Request) -> RedirectResponse:
134134
return RedirectResponse(
135135
f"{url_prefix}/client/index.html?{request.query_params}"
136136
)

0 commit comments

Comments
 (0)