summaryrefslogtreecommitdiff
path: root/slixmpp/stanza
diff options
context:
space:
mode:
Diffstat (limited to 'slixmpp/stanza')
-rw-r--r--slixmpp/stanza/atom.py3
-rw-r--r--slixmpp/stanza/error.py22
-rw-r--r--slixmpp/stanza/message.py4
-rw-r--r--slixmpp/stanza/presence.py7
-rw-r--r--slixmpp/stanza/roster.py3
-rw-r--r--slixmpp/stanza/stream_error.py4
6 files changed, 20 insertions, 23 deletions
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..2fff929e 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):