diff options
| author | 2018-11-27 17:29:38 +0000 | |
|---|---|---|
| committer | 2018-11-27 17:29:38 +0000 | |
| commit | e1cdd4a3538889fe4f334bb7fcf39c8a3f76fa9d (patch) | |
| tree | a9ccaed5d45b0ee9bfcc2828c8fe665a90d6f711 /src/IRCBot.py | |
| parent | Don't prefix "self." events with "received." (diff) | |
| signature | ||
Add type hint for return type of IRCBot.trigger
Diffstat (limited to 'src/IRCBot.py')
| -rw-r--r-- | src/IRCBot.py | 3 |
1 files changed, 2 insertions, 1 deletions
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() |
