From 0c6e860534d7d87dd697fc68efeae84f6d44647e Mon Sep 17 00:00:00 2001 From: Eric Callahan Date: Sun, 13 Nov 2022 14:16:59 -0500 Subject: [PATCH] extensions: fix type checking for Python 3.7 Signed-off-by: Eric Callahan --- moonraker/components/extensions.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/moonraker/components/extensions.py b/moonraker/components/extensions.py index eb6bd08..e9a4506 100644 --- a/moonraker/components/extensions.py +++ b/moonraker/components/extensions.py @@ -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"]