From d008988843f61efb57cb06a30b8a47a357e248a4 Mon Sep 17 00:00:00 2001 From: Emmanuel Gil Peyrot Date: Sat, 22 Oct 2016 13:35:54 +0100 Subject: =?UTF-8?q?Manual=20cleanup=20of=20the=20remaining=20set([?= =?UTF-8?q?=E2=80=A6])=20and=20set((=E2=80=A6)).?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- slixmpp/stanza/atom.py | 3 +-- slixmpp/stanza/error.py | 22 +++++++++++----------- slixmpp/stanza/message.py | 4 ++-- slixmpp/stanza/presence.py | 7 +++---- slixmpp/stanza/roster.py | 3 +-- slixmpp/stanza/stream_error.py | 4 ++-- 6 files changed, 20 insertions(+), 23 deletions(-) (limited to 'slixmpp/stanza') diff --git a/slixmpp/stanza/atom.py b/slixmpp/stanza/atom.py index c7192dd8..8dde00de 100644 --- a/slixmpp/stanza/atom.py +++ b/slixmpp/stanza/atom.py @@ -22,8 +22,7 @@ class AtomEntry(ElementBase): name = 'entry' plugin_attrib = 'entry' interfaces = {'title', 'summary', 'id', 'published', 'updated'} - sub_interfaces = set(('title', 'summary', 'id', 'published', - 'updated')) + sub_interfaces = {'title', 'summary', 'id', 'published', 'updated'} class AtomAuthor(ElementBase): diff --git a/slixmpp/stanza/error.py b/slixmpp/stanza/error.py index 145aaa24..132ffc4d 100644 --- a/slixmpp/stanza/error.py +++ b/slixmpp/stanza/error.py @@ -51,20 +51,20 @@ class Error(ElementBase): namespace = 'jabber:client' name = 'error' plugin_attrib = 'error' - interfaces = set(('code', 'condition', 'text', 'type', - 'gone', 'redirect', 'by')) + interfaces = {'code', 'condition', 'text', 'type', + 'gone', 'redirect', 'by'} sub_interfaces = {'text'} plugin_attrib_map = {} plugin_tag_map = {} - conditions = set(('bad-request', 'conflict', 'feature-not-implemented', - 'forbidden', 'gone', 'internal-server-error', - 'item-not-found', 'jid-malformed', 'not-acceptable', - 'not-allowed', 'not-authorized', 'payment-required', - 'recipient-unavailable', 'redirect', - 'registration-required', 'remote-server-not-found', - 'remote-server-timeout', 'resource-constraint', - 'service-unavailable', 'subscription-required', - 'undefined-condition', 'unexpected-request')) + conditions = {'bad-request', 'conflict', 'feature-not-implemented', + 'forbidden', 'gone', 'internal-server-error', + 'item-not-found', 'jid-malformed', 'not-acceptable', + 'not-allowed', 'not-authorized', 'payment-required', + 'recipient-unavailable', 'redirect', + 'registration-required', 'remote-server-not-found', + 'remote-server-timeout', 'resource-constraint', + 'service-unavailable', 'subscription-required', + 'undefined-condition', 'unexpected-request'} condition_ns = 'urn:ietf:params:xml:ns:xmpp-stanzas' types = {'cancel', 'continue', 'modify', 'auth', 'wait'} diff --git a/slixmpp/stanza/message.py b/slixmpp/stanza/message.py index b9f93b29..f5813eaf 100644 --- a/slixmpp/stanza/message.py +++ b/slixmpp/stanza/message.py @@ -47,8 +47,8 @@ class Message(RootStanza): name = 'message' namespace = 'jabber:client' plugin_attrib = name - interfaces = set(['type', 'to', 'from', 'id', 'body', 'subject', - 'thread', 'parent_thread', 'mucroom', 'mucnick']) + interfaces = {'type', 'to', 'from', 'id', 'body', 'subject', 'thread', + 'parent_thread', 'mucroom', 'mucnick'} sub_interfaces = {'body', 'subject', 'thread'} lang_interfaces = sub_interfaces types = {'normal', 'chat', 'headline', 'error', 'groupchat'} diff --git a/slixmpp/stanza/presence.py b/slixmpp/stanza/presence.py index 94382bce..614cd331 100644 --- a/slixmpp/stanza/presence.py +++ b/slixmpp/stanza/presence.py @@ -56,13 +56,12 @@ class Presence(RootStanza): name = 'presence' namespace = 'jabber:client' plugin_attrib = name - interfaces = set(['type', 'to', 'from', 'id', 'show', - 'status', 'priority']) + interfaces = {'type', 'to', 'from', 'id', 'show', 'status', 'priority'} sub_interfaces = {'show', 'status', 'priority'} lang_interfaces = {'status'} - types = set(['available', 'unavailable', 'error', 'probe', 'subscribe', - 'subscribed', 'unsubscribe', 'unsubscribed']) + types = {'available', 'unavailable', 'error', 'probe', 'subscribe', + 'subscribed', 'unsubscribe', 'unsubscribed'} showtypes = {'dnd', 'chat', 'xa', 'away'} def __init__(self, *args, **kwargs): diff --git a/slixmpp/stanza/roster.py b/slixmpp/stanza/roster.py index f846d595..11d38cc2 100644 --- a/slixmpp/stanza/roster.py +++ b/slixmpp/stanza/roster.py @@ -118,8 +118,7 @@ class RosterItem(ElementBase): namespace = 'jabber:iq:roster' name = 'item' plugin_attrib = 'item' - interfaces = set(('jid', 'name', 'subscription', 'ask', - 'approved', 'groups')) + interfaces = {'jid', 'name', 'subscription', 'ask', 'approved', 'groups'} def get_jid(self): return JID(self._get_attr('jid', '')) diff --git a/slixmpp/stanza/stream_error.py b/slixmpp/stanza/stream_error.py index 1b5cceb2..2aa70173 100644 --- a/slixmpp/stanza/stream_error.py +++ b/slixmpp/stanza/stream_error.py @@ -55,7 +55,7 @@ class StreamError(Error, StanzaBase): namespace = 'http://etherx.jabber.org/streams' interfaces = {'condition', 'text', 'see_other_host'} - conditions = set(( + conditions = { 'bad-format', 'bad-namespace-prefix', 'conflict', 'connection-timeout', 'host-gone', 'host-unknown', 'improper-addressing', 'internal-server-error', 'invalid-from', @@ -64,7 +64,7 @@ class StreamError(Error, StanzaBase): 'reset', 'resource-constraint', 'restricted-xml', 'see-other-host', 'system-shutdown', 'undefined-condition', 'unsupported-encoding', 'unsupported-feature', 'unsupported-stanza-type', - 'unsupported-version')) + 'unsupported-version'} condition_ns = 'urn:ietf:params:xml:ns:xmpp-streams' def get_see_other_host(self): -- cgit v1.2.3