extensions: fix type checking for Python 3.7

Signed-off-by:  Eric Callahan <arksine.code@gmail.com>
This commit is contained in:
Eric Callahan 2022-11-13 14:16:59 -05:00
parent 7f58f2274e
commit 0c6e860534
No known key found for this signature in database
GPG Key ID: 5A1EB336DFB4C71B
1 changed files with 2 additions and 1 deletions

View File

@ -25,6 +25,7 @@ if TYPE_CHECKING:
from moonraker import Server
from confighelper import ConfigHelper
from websockets import WebRequest
AsyncioServer = asyncio.base_events.Server
UNIX_BUFFER_LIMIT = 20 * 1024 * 1024
@ -32,7 +33,7 @@ class ExtensionManager:
def __init__(self, config: ConfigHelper) -> None:
self.server = config.get_server()
self.agents: Dict[str, BaseSocketClient] = {}
self.uds_server: Optional[asyncio.Server] = None
self.uds_server: Optional[AsyncioServer] = None
self.server.register_endpoint(
"/connection/send_event", ["POST"], self._handle_agent_event,
transports=["websocket"]