From 65b8046fe08a19df937068e5fe5ad15f9b0a785a Mon Sep 17 00:00:00 2001 From: Emmanuel Gil Peyrot Date: Sat, 12 Dec 2020 18:44:37 +0100 Subject: from __future__ import annotations MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Now that our baseline is Python 3.7, we can rely on type annotations to be lazily evaluated. --- poezio/windows/list.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'poezio/windows/list.py') diff --git a/poezio/windows/list.py b/poezio/windows/list.py index c427a79e..1c5d834f 100644 --- a/poezio/windows/list.py +++ b/poezio/windows/list.py @@ -24,10 +24,10 @@ class ListWin(Win): def __init__(self, columns: Dict[str, int], with_headers: bool = True) -> None: Win.__init__(self) - self._columns = columns # type: Dict[str, int] - self._columns_sizes = {} # type: Dict[str, int] + self._columns: Dict[str, int] = columns + self._columns_sizes: Dict[str, int] = {} self.sorted_by = (None, None) # for example: ('name', '↑') - self.lines = [] # type: List[str] + self.lines: List[str] = [] self._selected_row = 0 self._starting_pos = 0 # The column number from which we start the refresh @@ -173,7 +173,7 @@ class ColumnHeaderWin(Win): def __init__(self, columns: List[str]) -> None: Win.__init__(self) self._columns = columns - self._columns_sizes = {} # type: Dict[str, int] + self._columns_sizes: Dict[str, int] = {} self._column_sel = '' self._column_order = '' self._column_order_asc = False -- cgit v1.2.3