summaryrefslogtreecommitdiff
path: root/poezio/windows
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/windows
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/windows')
-rw-r--r--poezio/windows/inputs.py16
1 files changed, 9 insertions, 7 deletions
diff --git a/poezio/windows/inputs.py b/poezio/windows/inputs.py
index a0f97918..8ff420fd 100644
--- a/poezio/windows/inputs.py
+++ b/poezio/windows/inputs.py
@@ -2,11 +2,10 @@
Text inputs.
"""
-import logging
-log = logging.getLogger(__name__)
-
import curses
+import logging
import string
+from typing import List
from poezio import keyboard
from poezio import common
@@ -16,6 +15,8 @@ from poezio.windows.funcs import find_first_format_char
from poezio.config import config
from poezio.theming import to_curses_attr
+log = logging.getLogger(__name__)
+
DEFAULT_ON_INPUT = lambda x: None
@@ -583,7 +584,7 @@ class HistoryInput(Input):
An input with colors and stuff, plus an history
^R allows to search inside the history (as in a shell)
"""
- history = []
+ history = [] # type: List[str]
def __init__(self):
Input.__init__(self)
@@ -593,7 +594,7 @@ class HistoryInput(Input):
self.key_func['^R'] = self.toggle_search
self.search = False
if config.get('separate_history'):
- self.history = []
+ self.history = [] # type: List[str]
def toggle_search(self):
if self.help_message:
@@ -669,7 +670,8 @@ class MessageInput(HistoryInput):
Conversation, Muc and Private tabs
Also letting the user enter colors or other text markups
"""
- history = [] # The history is common to all MessageInput
+ # The history is common to all MessageInput
+ history = [] # type: List[str]
def __init__(self):
HistoryInput.__init__(self)
@@ -716,7 +718,7 @@ class CommandInput(HistoryInput):
HelpMessage when a command is started
The on_input callback
"""
- history = []
+ history = [] # type: List[str]
def __init__(self, help_message, on_abort, on_success, on_input=None):
HistoryInput.__init__(self)