Commit db230d0b authored by Link Mauve's avatar Link Mauve

windows.input_placeholders: Type everything in this module.

parent d3400669
......@@ -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
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment