From 5ea82ac0af1cb855c9333796004c6a97da6b5ad4 Mon Sep 17 00:00:00 2001 From: mathieui Date: Wed, 15 Aug 2018 14:21:59 +0200 Subject: Fix mypy errors, add type annotations --- poezio/tabs/privatetab.py | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) (limited to 'poezio/tabs/privatetab.py') diff --git a/poezio/tabs/privatetab.py b/poezio/tabs/privatetab.py index bc7f31c7..8f5f4d6f 100644 --- a/poezio/tabs/privatetab.py +++ b/poezio/tabs/privatetab.py @@ -10,10 +10,9 @@ both participant’s nicks. It also has slightly different features than the ConversationTab (such as tab-completion on nicks from the room). """ -import logging -log = logging.getLogger(__name__) - import curses +import logging +from typing import Dict, Callable from poezio.tabs import OneToOneTab, MucTab, Tab @@ -21,20 +20,23 @@ from poezio import windows from poezio import xhtml from poezio.common import safeJID from poezio.config import config +from poezio.core.structs import Command from poezio.decorators import refresh_wrapper from poezio.logger import logger from poezio.theming import get_theme, dump_tuple from poezio.decorators import command_args_parser +log = logging.getLogger(__name__) + class PrivateTab(OneToOneTab): """ The tab containg a private conversation (someone from a MUC) """ + plugin_commands = {} # type: Dict[str, Command] + plugin_keys = {} # type: Dict[str, Callable] message_type = 'chat' - plugin_commands = {} - additional_information = {} - plugin_keys = {} + additional_information = {} # type: Dict[str, Callable[[str], str]] def __init__(self, core, name, nick): OneToOneTab.__init__(self, core, name) -- cgit v1.2.3