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/roster_win.py | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'poezio/windows/roster_win.py') diff --git a/poezio/windows/roster_win.py b/poezio/windows/roster_win.py index 3497e342..3c62ea0a 100644 --- a/poezio/windows/roster_win.py +++ b/poezio/windows/roster_win.py @@ -20,6 +20,8 @@ Row = Union[RosterGroup, Contact] class RosterWin(Win): + __slots__ = ('pos', 'start_pos', 'selected_row', 'roster_cache') + def __init__(self) -> None: Win.__init__(self) self.pos = 0 # cursor position in the contact list @@ -342,6 +344,8 @@ class RosterWin(Win): class ContactInfoWin(Win): + __slots__ = () + def draw_contact_info(self, contact: Contact) -> None: """ draw the contact information -- cgit v1.2.3