Fixed a type (hopefully)

This commit is contained in:
Jacob Henry 2018-11-08 00:28:11 -05:00
parent 33557790bb
commit 3a7bd1811f
2 changed files with 4 additions and 2 deletions

View File

@ -22,6 +22,7 @@ api_file.close()
# Enable to use dummy
DEBUG_MODE = False
def main() -> None:
wrap = ClientWrapper()
@ -66,6 +67,7 @@ class ClientWrapper(object):
We only ever expect one of these.
Holds a slack client, and handles messsages.
"""
def __init__(self):
# Init slack
if DEBUG_MODE:

View File

@ -4,7 +4,7 @@ import re
from slackclient import SlackClient
import channel_util
from typing import Any, Optional, Generator, Match, Callable, List, Awaitable
from typing import Any, Optional, Generator, Match, Callable, List, Awaitable, Coroutine
"""
Slack helpers. Separated for compartmentalization
@ -84,7 +84,7 @@ def message_stream(slack: SlackClient) -> Generator[dict, None, None]:
class Hook(object):
def __init__(self,
callback: Callable[[SlackClient, dict, Match], Awaitable[None]], # TODO: Fix this type
callback: Coroutine[[SlackClient, dict, Match]],
pattern: str = None,
channel_whitelist: Optional[List[str]] = None,
channel_blacklist: Optional[List[str]] = None):