From cce1a4090a832a6fd2b7be4c610e469efb480b15 Mon Sep 17 00:00:00 2001 From: Emmanuel Gil Peyrot Date: Wed, 24 Oct 2018 16:28:55 +0200 Subject: Add __slots__ in most of the poezio.windows classes, to be more explicit about their data. --- poezio/windows/list.py | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'poezio/windows/list.py') diff --git a/poezio/windows/list.py b/poezio/windows/list.py index b24b8aea..f03dcf6a 100644 --- a/poezio/windows/list.py +++ b/poezio/windows/list.py @@ -19,6 +19,9 @@ class ListWin(Win): scrolled up and down, with one selected line at a time """ + __slots__ = ('_columns', '_columns_sizes', 'sorted_by', 'lines', + '_selected_row', '_starting_pos') + def __init__(self, columns: Dict[str, int], with_headers: bool = True) -> None: Win.__init__(self) self._columns = columns # type: Dict[str, int] @@ -165,6 +168,9 @@ class ColumnHeaderWin(Win): A class displaying the column's names """ + __slots__ = ('_columns', '_columns_sizes', '_column_sel', '_column_order', + '_column_order_asc') + def __init__(self, columns: List[str]) -> None: Win.__init__(self) self._columns = columns -- cgit v1.2.3