diff options
author | mathieui <mathieui@mathieui.net> | 2018-07-21 23:58:07 +0200 |
---|---|---|
committer | mathieui <mathieui@mathieui.net> | 2018-07-21 23:58:07 +0200 |
commit | 7fd672caca8843a865f67d9befd814603447a1d7 (patch) | |
tree | 46e2ceda3a75d8739b169cb9b9c22164f4edd01f | |
parent | 73d198561db974dc15b4314daba776152427ed08 (diff) | |
download | poezio-7fd672caca8843a865f67d9befd814603447a1d7.tar.gz poezio-7fd672caca8843a865f67d9befd814603447a1d7.tar.bz2 poezio-7fd672caca8843a865f67d9befd814603447a1d7.tar.xz poezio-7fd672caca8843a865f67d9befd814603447a1d7.zip |
Fix Python 3.5 compatibility (no PEP 526)
:(
Debian stable can't have nice things.
-rw-r--r-- | poezio/core/tabs.py | 20 |
1 files changed, 8 insertions, 12 deletions
diff --git a/poezio/core/tabs.py b/poezio/core/tabs.py index ab2f0344..de5c44b8 100644 --- a/poezio/core/tabs.py +++ b/poezio/core/tabs.py @@ -37,12 +37,6 @@ 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): """ @@ -51,12 +45,14 @@ class Tabs: once. Otherwise, mayhem is expected. """ # cursor - self._current_index = 0 - self._previous_tab = None - self._current_tab = None - self._tabs = [] - self._tab_types = defaultdict(list) - self._tab_names = dict() + self._current_index = 0 # type: int + self._current_tab = None # type: Optional[tabs.Tab] + + self._previous_tab = None # type: Optional[tabs.Tab] + self._tabs = [] # type: List[tabs.Tab] + self._tab_types = defaultdict( + list) # type: Dict[Type[tabs.Tab], List[tabs.Tab]] + self._tab_names = dict() # type: Dict[str, tabs.Tab] def __len__(self): return len(self._tabs) |