diff options
author | mathieui <mathieui@mathieui.net> | 2020-05-28 21:31:18 +0200 |
---|---|---|
committer | mathieui <mathieui@mathieui.net> | 2020-06-01 09:09:09 +0200 |
commit | c9e219c1405604f2ef81b3e446cc33a0492af42d (patch) | |
tree | 70a184a22724be16ce7a7ef930d07e9eda203ade /poezio/windows | |
parent | 4fae01c09a286809f046c4347fa799f79a2cc129 (diff) | |
download | poezio-c9e219c1405604f2ef81b3e446cc33a0492af42d.tar.gz poezio-c9e219c1405604f2ef81b3e446cc33a0492af42d.tar.bz2 poezio-c9e219c1405604f2ef81b3e446cc33a0492af42d.tar.xz poezio-c9e219c1405604f2ef81b3e446cc33a0492af42d.zip |
mypy: Reduce errors on muctab.py by a lot
Diffstat (limited to 'poezio/windows')
-rw-r--r-- | poezio/windows/info_wins.py | 17 |
1 files changed, 15 insertions, 2 deletions
diff --git a/poezio/windows/info_wins.py b/poezio/windows/info_wins.py index d31130fe..c3975c8c 100644 --- a/poezio/windows/info_wins.py +++ b/poezio/windows/info_wins.py @@ -3,6 +3,8 @@ Module defining all the "info wins", ie the bar which is on top of the info buffer in normal tabs """ +from typing import Optional, Dict, TYPE_CHECKING, Any + import logging log = logging.getLogger(__name__) @@ -13,6 +15,11 @@ from poezio.windows.base_wins import Win from poezio.ui.funcs import truncate_nick from poezio.theming import get_theme, to_curses_attr +if TYPE_CHECKING: + from poezio.user import User + from poezio.tabs import MucTab + from poezio.windows import TextWin + class InfoWin(Win): """ @@ -260,10 +267,16 @@ class MucInfoWin(InfoWin): __slots__ = () - def __init__(self): + def __init__(self) -> None: InfoWin.__init__(self) - def refresh(self, room, window=None, user=None, information=None): + def refresh( + self, + room: 'MucTab', + window: Optional['TextWin'] = None, + user: Optional['User'] = None, + information: Optional[Dict[str, Any]] = None + ) -> None: log.debug('Refresh: %s', self.__class__.__name__) self._win.erase() self.write_room_name(room) |