summaryrefslogtreecommitdiff
path: root/poezio/tabs/muctab.py
diff options
context:
space:
mode:
authormathieui <mathieui@mathieui.net>2018-08-15 14:21:59 +0200
committermathieui <mathieui@mathieui.net>2018-08-15 14:23:00 +0200
commit5ea82ac0af1cb855c9333796004c6a97da6b5ad4 (patch)
treef737e7e25012b76324ae03b591e19266a113a845 /poezio/tabs/muctab.py
parentcccb1d97591966de1bab1b293294eefb17b90aac (diff)
downloadpoezio-5ea82ac0af1cb855c9333796004c6a97da6b5ad4.tar.gz
poezio-5ea82ac0af1cb855c9333796004c6a97da6b5ad4.tar.bz2
poezio-5ea82ac0af1cb855c9333796004c6a97da6b5ad4.tar.xz
poezio-5ea82ac0af1cb855c9333796004c6a97da6b5ad4.zip
Fix mypy errors, add type annotations
Diffstat (limited to 'poezio/tabs/muctab.py')
-rw-r--r--poezio/tabs/muctab.py12
1 files changed, 7 insertions, 5 deletions
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)