aboutsummaryrefslogtreecommitdiffstats
path: root/slack
diff options
context:
space:
mode:
Diffstat (limited to 'slack')
-rw-r--r--slack/util.py6
1 files changed, 4 insertions, 2 deletions
diff --git a/slack/util.py b/slack/util.py
index c6cb57d..112f060 100644
--- a/slack/util.py
+++ b/slack/util.py
@@ -1,11 +1,13 @@
-from typing import Any, Callable
+from typing import Callable, Dict, Union
import weechat
from slack.shared import shared
+weechat_callback_return_type = Union[int, str, Dict[str, str], None]
-def get_callback_name(callback: Callable[..., Any]) -> str:
+
+def get_callback_name(callback: Callable[..., weechat_callback_return_type]) -> str:
shared.weechat_callbacks[callback.__name__] = callback
return callback.__name__