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/muctab.py | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) (limited to 'poezio/tabs/muctab.py') diff --git a/poezio/tabs/muctab.py b/poezio/tabs/muctab.py index 4ec973a9..934dc0b1 100644 --- a/poezio/tabs/muctab.py +++ b/poezio/tabs/muctab.py @@ -7,15 +7,14 @@ It keeps track of many things such as part/joins, maintains an user list, and updates private tabs when necessary. """ -import logging -log = logging.getLogger(__name__) - import bisect import curses +import logging import os import random import re from datetime import datetime +from typing import Dict, Callable from poezio.tabs import ChatTab, Tab, SHOW_NAME @@ -27,6 +26,7 @@ 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, command_args_parser from poezio.logger import logger from poezio.roster import roster @@ -34,6 +34,8 @@ from poezio.theming import get_theme, dump_tuple from poezio.user import User from poezio.core.structs import Completion, Status +log = logging.getLogger(__name__) + NS_MUC_USER = 'http://jabber.org/protocol/muc#user' STATUS_XPATH = '{%s}x/{%s}status' % (NS_MUC_USER, NS_MUC_USER) @@ -44,8 +46,8 @@ class MucTab(ChatTab): It contains an userlist, an input, a topic, an information and a chat zone """ message_type = 'groupchat' - plugin_commands = {} - plugin_keys = {} + plugin_commands = {} # type: Dict[str, Command] + plugin_keys = {} # type: Dict[str, Callable] def __init__(self, core, jid, nick, password=None): ChatTab.__init__(self, core, jid) -- cgit v1.2.3