From e1cdd4a3538889fe4f334bb7fcf39c8a3f76fa9d Mon Sep 17 00:00:00 2001 From: jesopo Date: Tue, 27 Nov 2018 17:29:38 +0000 Subject: [PATCH] Add type hint for return type of IRCBot.trigger --- src/IRCBot.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/IRCBot.py b/src/IRCBot.py index 1ae8aa54..4a69afd1 100644 --- a/src/IRCBot.py +++ b/src/IRCBot.py @@ -33,7 +33,8 @@ class Bot(object): self._events.on("timer.reconnect").hook(self._timed_reconnect) def trigger(self, - func: typing.Optional[typing.Callable[[], typing.Any]]=None): + func: typing.Optional[typing.Callable[[], typing.Any]]=None + ) -> typing.Any: func = func or (lambda: None) if threading.current_thread() is threading.main_thread(): returned = func()