mirror of
https://github.com/dcs-liberation/dcs_liberation.git
synced 2025-11-10 14:22:26 +00:00
Update mypy.
Needed so mypy can recognize the new Python 3.12 generic syntax.
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
import asyncio
|
||||
from asyncio import wait
|
||||
from asyncio import wait, Future
|
||||
|
||||
from fastapi import APIRouter, WebSocket
|
||||
from fastapi.encoders import jsonable_encoder
|
||||
@@ -16,9 +16,9 @@ class ConnectionManager:
|
||||
self.active_connections: list[WebSocket] = []
|
||||
|
||||
async def shutdown(self) -> None:
|
||||
futures = []
|
||||
futures: list[Future[None]] = []
|
||||
for connection in self.active_connections:
|
||||
futures.append(connection.close())
|
||||
futures.append(asyncio.create_task(connection.close()))
|
||||
await wait(futures)
|
||||
|
||||
async def connect(self, websocket: WebSocket) -> None:
|
||||
|
||||
Reference in New Issue
Block a user