Commit 47bd3ab8 authored by Link Mauve's avatar Link Mauve

windows.misc: Type everything in this module.

parent 176b4ee9
......@@ -3,13 +3,15 @@ Wins that don’t fit any category
import logging
log = logging.getLogger(__name__)
import curses
from typing import List
from import Win
from poezio.theming import get_theme, to_curses_attr
log = logging.getLogger(__name__)
class VerticalSeparator(Win):
......@@ -17,23 +19,23 @@ class VerticalSeparator(Win):
refreshed only on resize, but never on refresh, for efficiency
def rewrite_line(self):
def rewrite_line(self) -> None:
self._win.vline(0, 0, curses.ACS_VLINE, self.height,
def refresh(self):
def refresh(self) -> None:
log.debug('Refresh: %s', self.__class__.__name__)
class SimpleTextWin(Win):
def __init__(self, text):
def __init__(self, text) -> None:
self._text = text
self.built_lines = []
self.built_lines = [] # type: List[str]
def rebuild_text(self):
def rebuild_text(self) -> None:
Transform the text in lines than can then be
displayed without any calculation or anything
......@@ -50,7 +52,7 @@ class SimpleTextWin(Win):
line = line[limit:]
def refresh(self):
def refresh(self) -> None:
log.debug('Refresh: %s', self.__class__.__name__)
for y, line in enumerate(self.built_lines):
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