diff options
author | mathieui <mathieui@mathieui.net> | 2018-07-21 21:37:00 +0200 |
---|---|---|
committer | mathieui <mathieui@mathieui.net> | 2018-07-21 21:38:26 +0200 |
commit | 0bdc9676d2a5065865ff0e0db4ebcbf76179de7c (patch) | |
tree | b9d7118c6f432ab5a9c05cd168ca3d05b3ff7328 | |
parent | 534ba14d5c898d50ffcdfd8539eedf10165f7fd9 (diff) | |
download | poezio-0bdc9676d2a5065865ff0e0db4ebcbf76179de7c.tar.gz poezio-0bdc9676d2a5065865ff0e0db4ebcbf76179de7c.tar.bz2 poezio-0bdc9676d2a5065865ff0e0db4ebcbf76179de7c.tar.xz poezio-0bdc9676d2a5065865ff0e0db4ebcbf76179de7c.zip |
Split type declarations from __init__
-rw-r--r-- | poezio/core/tabs.py | 19 |
1 files changed, 12 insertions, 7 deletions
diff --git a/poezio/core/tabs.py b/poezio/core/tabs.py index 91a10497..ab2f0344 100644 --- a/poezio/core/tabs.py +++ b/poezio/core/tabs.py @@ -37,6 +37,12 @@ class Tabs: '_current_index', '_current_tab', '_tabs', '_tab_types', '_tab_names', '_previous_tab' ] + _current_index: int + _current_tab: Optional[tabs.Tab] + _previous_tab: Optional[tabs.Tab] + _tabs: List[tabs.Tab] + _tab_types: Dict[Type[tabs.Tab], List[tabs.Tab]] + _tab_names: Dict[str, tabs.Tab] def __init__(self): """ @@ -45,13 +51,12 @@ class Tabs: once. Otherwise, mayhem is expected. """ # cursor - self._current_index: int = 0 - self._previous_tab: Optional[tabs.Tab] = None - self._current_tab: Optional[tabs.Tab] = None - self._tabs: List[tabs.Tab] = [] - self._tab_types: Dict[Type[tabs.Tab], List[tabs.Tab]] = defaultdict( - list) - self._tab_names: Dict[str, tabs.Tab] = dict() + self._current_index = 0 + self._previous_tab = None + self._current_tab = None + self._tabs = [] + self._tab_types = defaultdict(list) + self._tab_names = dict() def __len__(self): return len(self._tabs) |