From c8be0db79dcfdccb3119548c8ba66fdebfd72bac Mon Sep 17 00:00:00 2001 From: Salvo 'LtWorf' Tomaselli Date: Sun, 21 Jun 2020 22:57:51 +0200 Subject: [PATCH] Make mypy happy Relates to https://github.com/python/mypy/issues/9003 I hope one day that the ignore and the explicit type declarations will not be needed. --- slack.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/slack.py b/slack.py index 520126e3..1843518f 100644 --- a/slack.py +++ b/slack.py @@ -789,9 +789,9 @@ def events_iter(self) -> Iterator[Optional[SlackEvent]]: continue try: - ev = load( + ev: Optional[Union[TopicChange, FileShared, MessageBot, MessageEdit, MessageDelete, GroupJoined, Join, Leave]] = load( event, - Union[TopicChange, FileShared, MessageBot, MessageEdit, MessageDelete, GroupJoined, Join, Leave] + Union[TopicChange, FileShared, MessageBot, MessageEdit, MessageDelete, GroupJoined, Join, Leave] # type: ignore ) except Exception: ev = None