diff options
author | Trygve Aaberge <trygveaa@gmail.com> | 2023-01-29 16:58:45 +0100 |
---|---|---|
committer | Trygve Aaberge <trygveaa@gmail.com> | 2024-02-18 11:32:53 +0100 |
commit | e892fca6a2140057b155bf623a5dc11ea41e2577 (patch) | |
tree | 0317dc38ca3936a542677095e9286e3b8022e3cc /slack/commands.py | |
parent | b28acc3d7d14acfc5c8244118a4e57909d88e752 (diff) | |
download | wee-slack-e892fca6a2140057b155bf623a5dc11ea41e2577.tar.gz |
Fix some mypy specific type issues
Diffstat (limited to 'slack/commands.py')
-rw-r--r-- | slack/commands.py | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/slack/commands.py b/slack/commands.py index b4bb1b5..c60b420 100644 --- a/slack/commands.py +++ b/slack/commands.py @@ -53,8 +53,13 @@ class Command: def weechat_command( completion: str = "", min_args: int = 0, slack_buffer_required: bool = False -): - def decorator(f: Callable[[str, List[str], Dict[str, Optional[str]]], None]): +) -> Callable[ + [Callable[[str, List[str], Dict[str, Optional[str]]], None]], + Callable[[str, str], None], +]: + def decorator( + f: Callable[[str, List[str], Dict[str, Optional[str]]], None] + ) -> Callable[[str, str], None]: cmd = removeprefix(f.__name__, "command_").replace("_", " ") top_level = " " not in cmd @@ -367,7 +372,7 @@ async def complete_user_next( complete_input(conversation, query) -def complete_previous(conversation: SlackConversation, query: str): +def complete_previous(conversation: SlackConversation, query: str) -> int: if conversation.completion_context == "ACTIVE_COMPLETION": conversation.completion_index -= 1 if conversation.completion_index < 0: |