From 5a5b36ab39c4219e4a9589c07bd1ce57dd25aac8 Mon Sep 17 00:00:00 2001 From: mathieui Date: Fri, 9 Feb 2024 22:58:20 +0100 Subject: [PATCH] xmlstream: make mypy even happier --- slixmpp/xmlstream/xmlstream.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/slixmpp/xmlstream/xmlstream.py b/slixmpp/xmlstream/xmlstream.py index 95e6b9a3..0cefa6ef 100644 --- a/slixmpp/xmlstream/xmlstream.py +++ b/slixmpp/xmlstream/xmlstream.py @@ -524,7 +524,7 @@ class XMLStream(asyncio.BaseProtocol): else: self.loop.run_until_complete(self.disconnected) else: - tasks: List[asyncio.Task] = [asyncio.Task(asyncio.sleep(timeout))] + tasks: List[Union[asyncio.Task, asyncio.Future]] = [asyncio.Task(asyncio.sleep(timeout))] if not forever: tasks.append(self.disconnected) self.loop.run_until_complete(asyncio.wait(tasks))