diff options
-rw-r--r-- | poezio/windows/input_placeholders.py | 14 |
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 |