windows.input_placeholders: Type everything in this module.
This commit is contained in:
parent
d340066936
commit
db230d0b3e
1 changed files with 8 additions and 6 deletions
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue