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/info_wins.py | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) (limited to 'poezio/windows/info_wins.py') diff --git a/poezio/windows/info_wins.py b/poezio/windows/info_wins.py index 27f9e1cf..0a8f0f27 100644 --- a/poezio/windows/info_wins.py +++ b/poezio/windows/info_wins.py @@ -20,6 +20,8 @@ class InfoWin(Win): MucInfoWin, etc. Provides some useful methods. """ + __slots__ = () + def __init__(self): Win.__init__(self) @@ -40,6 +42,8 @@ class XMLInfoWin(InfoWin): Info about the latest xml filter used and the state of the buffer. """ + __slots__ = () + def __init__(self): InfoWin.__init__(self) @@ -63,6 +67,8 @@ class PrivateInfoWin(InfoWin): about the MUC user we are talking to """ + __slots__ = () + def __init__(self): InfoWin.__init__(self) @@ -104,6 +110,8 @@ class MucListInfoWin(InfoWin): about the muc server being listed """ + __slots__ = ('message') + def __init__(self, message=''): InfoWin.__init__(self) self.message = message @@ -129,6 +137,8 @@ class ConversationInfoWin(InfoWin): about the user we are talking to """ + __slots__ = () + def __init__(self): InfoWin.__init__(self) @@ -218,6 +228,8 @@ class ConversationInfoWin(InfoWin): class DynamicConversationInfoWin(ConversationInfoWin): + __slots__ = () + def write_contact_jid(self, jid): """ Just displays the resource in an other color @@ -240,6 +252,8 @@ class MucInfoWin(InfoWin): about the MUC we are viewing """ + __slots__ = () + def __init__(self): InfoWin.__init__(self) @@ -306,6 +320,8 @@ class ConversationStatusMessageWin(InfoWin): The upper bar displaying the status message of the contact """ + __slots__ = () + def __init__(self): InfoWin.__init__(self) @@ -331,6 +347,8 @@ class ConversationStatusMessageWin(InfoWin): class BookmarksInfoWin(InfoWin): + __slots__ = () + def __init__(self): InfoWin.__init__(self) @@ -347,6 +365,8 @@ class BookmarksInfoWin(InfoWin): class ConfirmStatusWin(Win): + __slots__ = ('text', 'critical') + def __init__(self, text, critical=False): Win.__init__(self) self.text = text -- cgit v1.2.3