summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEmmanuel Gil Peyrot <linkmauve@linkmauve.fr>2018-08-17 17:18:42 +0100
committerEmmanuel Gil Peyrot <linkmauve@linkmauve.fr>2018-08-17 18:36:49 +0100
commitdb230d0b3ef397627d904ce6104c91a87326b8a6 (patch)
tree82856584a8b2b9cf5212cd020f6ac471bf62d08d
parentd3400669368537d016c6d821f8e85a9592f6d4d9 (diff)
downloadpoezio-db230d0b3ef397627d904ce6104c91a87326b8a6.tar.gz
poezio-db230d0b3ef397627d904ce6104c91a87326b8a6.tar.bz2
poezio-db230d0b3ef397627d904ce6104c91a87326b8a6.tar.xz
poezio-db230d0b3ef397627d904ce6104c91a87326b8a6.zip
windows.input_placeholders: Type everything in this module.
-rw-r--r--poezio/windows/input_placeholders.py14
1 files changed, 8 insertions, 6 deletions
diff --git a/poezio/windows/input_placeholders.py b/poezio/windows/input_placeholders.py
index 47cfac31..c5656f72 100644
--- a/poezio/windows/input_placeholders.py
+++ b/poezio/windows/input_placeholders.py
@@ -9,6 +9,8 @@ log = logging.getLogger(__name__)
from poezio.windows.base_wins import Win
from poezio.theming import get_theme, to_curses_attr
+from typing import Optional
+
class HelpText(Win):
"""
@@ -17,13 +19,13 @@ class HelpText(Win):
command mode.
"""
- def __init__(self, text=''):
+ def __init__(self, text: str = '') -> None:
Win.__init__(self)
- self.txt = text
+ self.txt = text # type: str
- def refresh(self, txt=None):
+ def refresh(self, txt: Optional[str] = None) -> None:
log.debug('Refresh: %s', self.__class__.__name__)
- if txt:
+ if txt is not None:
self.txt = txt
self._win.erase()
self.addstr(0, 0, self.txt[:self.width - 1],
@@ -31,8 +33,8 @@ class HelpText(Win):
self.finish_line(get_theme().COLOR_INFORMATION_BAR)
self._refresh()
- def do_command(self, key, raw=False):
+ def do_command(self, key, raw: bool = False) -> bool:
return False
- def on_delete(self):
+ def on_delete(self) -> None:
return