diff options
116 files changed, 262 insertions, 262 deletions
diff --git a/slixmpp/features/feature_mechanisms/stanza/auth.py b/slixmpp/features/feature_mechanisms/stanza/auth.py index e024ef22..48f0cf81 100644 --- a/slixmpp/features/feature_mechanisms/stanza/auth.py +++ b/slixmpp/features/feature_mechanisms/stanza/auth.py @@ -24,7 +24,7 @@ class Auth(StanzaBase): #: Some SASL mechs require sending values as is, #: without converting base64. - plain_mechs = set(['X-MESSENGER-OAUTH2']) + plain_mechs = {'X-MESSENGER-OAUTH2'} def setup(self, xml): StanzaBase.setup(self, xml) diff --git a/slixmpp/features/feature_mechanisms/stanza/success.py b/slixmpp/features/feature_mechanisms/stanza/success.py index f7cde0f8..70be1780 100644 --- a/slixmpp/features/feature_mechanisms/stanza/success.py +++ b/slixmpp/features/feature_mechanisms/stanza/success.py @@ -18,7 +18,7 @@ class Success(StanzaBase): name = 'success' namespace = 'urn:ietf:params:xml:ns:xmpp-sasl' - interfaces = set(['value']) + interfaces = {'value'} plugin_attrib = name def setup(self, xml): diff --git a/slixmpp/plugins/google/auth/stanza.py b/slixmpp/plugins/google/auth/stanza.py index c5c693ee..5b1b7862 100644 --- a/slixmpp/plugins/google/auth/stanza.py +++ b/slixmpp/plugins/google/auth/stanza.py @@ -13,7 +13,7 @@ class GoogleAuth(ElementBase): name = 'auth' namespace = 'http://www.google.com/talk/protocol/auth' plugin_attrib = 'google' - interfaces = set(['client_uses_full_bind_result', 'service']) + interfaces = {'client_uses_full_bind_result', 'service'} discovery_attr= '{%s}client-uses-full-bind-result' % namespace service_attr= '{%s}service' % namespace diff --git a/slixmpp/plugins/google/nosave/stanza.py b/slixmpp/plugins/google/nosave/stanza.py index b060a486..2281c91e 100644 --- a/slixmpp/plugins/google/nosave/stanza.py +++ b/slixmpp/plugins/google/nosave/stanza.py @@ -14,7 +14,7 @@ class NoSave(ElementBase): name = 'x' namespace = 'google:nosave' plugin_attrib = 'google_nosave' - interfaces = set(['value']) + interfaces = {'value'} def get_value(self): return self._get_attr('value', '') == 'enabled' @@ -35,7 +35,7 @@ class Item(ElementBase): namespace = 'google:nosave' plugin_attrib = 'item' plugin_multi_attrib = 'items' - interfaces = set(['jid', 'source', 'value']) + interfaces = {'jid', 'source', 'value'} def get_value(self): return self._get_attr('value', '') == 'enabled' diff --git a/slixmpp/plugins/xep_0004/dataforms.py b/slixmpp/plugins/xep_0004/dataforms.py index 90a87774..857bbd1c 100644 --- a/slixmpp/plugins/xep_0004/dataforms.py +++ b/slixmpp/plugins/xep_0004/dataforms.py @@ -23,7 +23,7 @@ class XEP_0004(BasePlugin): name = 'xep_0004' description = 'XEP-0004: Data Forms' - dependencies = set(['xep_0030']) + dependencies = {'xep_0030'} stanza = stanza def plugin_init(self): diff --git a/slixmpp/plugins/xep_0009/rpc.py b/slixmpp/plugins/xep_0009/rpc.py index 3ce156cf..60ee3b9b 100644 --- a/slixmpp/plugins/xep_0009/rpc.py +++ b/slixmpp/plugins/xep_0009/rpc.py @@ -24,7 +24,7 @@ class XEP_0009(BasePlugin): name = 'xep_0009' description = 'XEP-0009: Jabber-RPC' - dependencies = set(['xep_0030']) + dependencies = {'xep_0030'} stanza = stanza def plugin_init(self): diff --git a/slixmpp/plugins/xep_0012/last_activity.py b/slixmpp/plugins/xep_0012/last_activity.py index 6367e393..807c0e05 100644 --- a/slixmpp/plugins/xep_0012/last_activity.py +++ b/slixmpp/plugins/xep_0012/last_activity.py @@ -29,7 +29,7 @@ class XEP_0012(BasePlugin): name = 'xep_0012' description = 'XEP-0012: Last Activity' - dependencies = set(['xep_0030']) + dependencies = {'xep_0030'} stanza = stanza def plugin_init(self): diff --git a/slixmpp/plugins/xep_0013/offline.py b/slixmpp/plugins/xep_0013/offline.py index 51840e7b..7303b0d3 100644 --- a/slixmpp/plugins/xep_0013/offline.py +++ b/slixmpp/plugins/xep_0013/offline.py @@ -29,7 +29,7 @@ class XEP_0013(BasePlugin): name = 'xep_0013' description = 'XEP-0013: Flexible Offline Message Retrieval' - dependencies = set(['xep_0030']) + dependencies = {'xep_0030'} stanza = stanza def plugin_init(self): diff --git a/slixmpp/plugins/xep_0013/stanza.py b/slixmpp/plugins/xep_0013/stanza.py index cf9c385b..780d1f74 100644 --- a/slixmpp/plugins/xep_0013/stanza.py +++ b/slixmpp/plugins/xep_0013/stanza.py @@ -14,7 +14,7 @@ class Offline(ElementBase): name = 'offline' namespace = 'http://jabber.org/protocol/offline' plugin_attrib = 'offline' - interfaces = set(['fetch', 'purge', 'results']) + interfaces = {'fetch', 'purge', 'results'} bool_interfaces = interfaces def setup(self, xml=None): @@ -39,9 +39,9 @@ class Item(ElementBase): name = 'item' namespace = 'http://jabber.org/protocol/offline' plugin_attrib = 'item' - interfaces = set(['action', 'node', 'jid']) + interfaces = {'action', 'node', 'jid'} - actions = set(['view', 'remove']) + actions = {'view', 'remove'} def get_jid(self): return JID(self._get_attr('jid')) diff --git a/slixmpp/plugins/xep_0016/privacy.py b/slixmpp/plugins/xep_0016/privacy.py index 38444b2b..2b8d623d 100644 --- a/slixmpp/plugins/xep_0016/privacy.py +++ b/slixmpp/plugins/xep_0016/privacy.py @@ -17,7 +17,7 @@ class XEP_0016(BasePlugin): name = 'xep_0016' description = 'XEP-0016: Privacy Lists' - dependencies = set(['xep_0030']) + dependencies = {'xep_0030'} stanza = stanza def plugin_init(self): diff --git a/slixmpp/plugins/xep_0016/stanza.py b/slixmpp/plugins/xep_0016/stanza.py index 58c9fdb3..9a2cfa9f 100644 --- a/slixmpp/plugins/xep_0016/stanza.py +++ b/slixmpp/plugins/xep_0016/stanza.py @@ -18,14 +18,14 @@ class Active(ElementBase): name = 'active' namespace = 'jabber:iq:privacy' plugin_attrib = name - interfaces = set(['name']) + interfaces = {'name'} class Default(ElementBase): name = 'default' namespace = 'jabber:iq:privacy' plugin_attrib = name - interfaces = set(['name']) + interfaces = {'name'} class List(ElementBase): @@ -33,7 +33,7 @@ class List(ElementBase): namespace = 'jabber:iq:privacy' plugin_attrib = name plugin_multi_attrib = 'lists' - interfaces = set(['name']) + interfaces = {'name'} def add_item(self, value, action, order, itype=None, iq=False, message=False, presence_in=False, presence_out=False): @@ -57,7 +57,7 @@ class Item(ElementBase): plugin_multi_attrib = 'items' interfaces = set(['type', 'value', 'action', 'order', 'iq', 'message', 'presence_in', 'presence_out']) - bool_interfaces = set(['message', 'iq', 'presence_in', 'presence_out']) + bool_interfaces = {'message', 'iq', 'presence_in', 'presence_out'} type_values = ('', 'jid', 'group', 'subscription') action_values = ('allow', 'deny') diff --git a/slixmpp/plugins/xep_0020/feature_negotiation.py b/slixmpp/plugins/xep_0020/feature_negotiation.py index 2f4e8c15..b024bf0d 100644 --- a/slixmpp/plugins/xep_0020/feature_negotiation.py +++ b/slixmpp/plugins/xep_0020/feature_negotiation.py @@ -24,7 +24,7 @@ class XEP_0020(BasePlugin): name = 'xep_0020' description = 'XEP-0020: Feature Negotiation' - dependencies = set(['xep_0004', 'xep_0030']) + dependencies = {'xep_0004', 'xep_0030'} stanza = stanza def plugin_init(self): diff --git a/slixmpp/plugins/xep_0027/stanza.py b/slixmpp/plugins/xep_0027/stanza.py index fd41cace..b1fb50be 100644 --- a/slixmpp/plugins/xep_0027/stanza.py +++ b/slixmpp/plugins/xep_0027/stanza.py @@ -13,7 +13,7 @@ class Signed(ElementBase): name = 'x' namespace = 'jabber:x:signed' plugin_attrib = 'signed' - interfaces = set(['signed']) + interfaces = {'signed'} is_extension = True def set_signed(self, value): @@ -33,7 +33,7 @@ class Encrypted(ElementBase): name = 'x' namespace = 'jabber:x:encrypted' plugin_attrib = 'encrypted' - interfaces = set(['encrypted']) + interfaces = {'encrypted'} is_extension = True def set_encrypted(self, value): diff --git a/slixmpp/plugins/xep_0030/stanza/info.py b/slixmpp/plugins/xep_0030/stanza/info.py index 7102d529..b23af0cc 100644 --- a/slixmpp/plugins/xep_0030/stanza/info.py +++ b/slixmpp/plugins/xep_0030/stanza/info.py @@ -91,7 +91,7 @@ class DiscoInfo(ElementBase): """ ElementBase.setup(self, xml) - self._identities = set([id[0:3] for id in self['identities']]) + self._identities = {id[0:3] for id in self['identities']} self._features = self['features'] def add_identity(self, category, itype, name=None, lang=None): diff --git a/slixmpp/plugins/xep_0030/stanza/items.py b/slixmpp/plugins/xep_0030/stanza/items.py index a59d9114..b0fd0bf1 100644 --- a/slixmpp/plugins/xep_0030/stanza/items.py +++ b/slixmpp/plugins/xep_0030/stanza/items.py @@ -62,7 +62,7 @@ class DiscoItems(ElementBase): xml -- Use an existing XML object for the stanza's values. """ ElementBase.setup(self, xml) - self._items = set([item[0:2] for item in self['items']]) + self._items = {item[0:2] for item in self['items']} def add_item(self, jid, node=None, name=None): """ diff --git a/slixmpp/plugins/xep_0033/addresses.py b/slixmpp/plugins/xep_0033/addresses.py index 7b3c2d17..5fadd44d 100644 --- a/slixmpp/plugins/xep_0033/addresses.py +++ b/slixmpp/plugins/xep_0033/addresses.py @@ -22,7 +22,7 @@ class XEP_0033(BasePlugin): name = 'xep_0033' description = 'XEP-0033: Extended Stanza Addressing' - dependencies = set(['xep_0030']) + dependencies = {'xep_0030'} stanza = stanza def plugin_init(self): diff --git a/slixmpp/plugins/xep_0033/stanza.py b/slixmpp/plugins/xep_0033/stanza.py index d2a67de1..c3a58037 100644 --- a/slixmpp/plugins/xep_0033/stanza.py +++ b/slixmpp/plugins/xep_0033/stanza.py @@ -37,7 +37,7 @@ class Address(ElementBase): name = 'address' namespace = 'http://jabber.org/protocol/address' plugin_attrib = 'address' - interfaces = set(['type', 'jid', 'node', 'uri', 'desc', 'delivered']) + interfaces = {'type', 'jid', 'node', 'uri', 'desc', 'delivered'} address_types = {'bcc', 'cc', 'noreply', 'replyroom', 'replyto', 'to'} diff --git a/slixmpp/plugins/xep_0045.py b/slixmpp/plugins/xep_0045.py index ce4631ef..3d910316 100644 --- a/slixmpp/plugins/xep_0045.py +++ b/slixmpp/plugins/xep_0045.py @@ -117,7 +117,7 @@ class XEP_0045(BasePlugin): name = 'xep_0045' description = 'XEP-0045: Multi-User Chat' - dependencies = set(['xep_0030', 'xep_0004']) + dependencies = {'xep_0030', 'xep_0004'} def plugin_init(self): self.rooms = {} diff --git a/slixmpp/plugins/xep_0047/ibb.py b/slixmpp/plugins/xep_0047/ibb.py index 52d7fbe5..bd96eca2 100644 --- a/slixmpp/plugins/xep_0047/ibb.py +++ b/slixmpp/plugins/xep_0047/ibb.py @@ -18,7 +18,7 @@ class XEP_0047(BasePlugin): name = 'xep_0047' description = 'XEP-0047: In-band Bytestreams' - dependencies = set(['xep_0030']) + dependencies = {'xep_0030'} stanza = stanza default_config = { 'block_size': 4096, diff --git a/slixmpp/plugins/xep_0047/stanza.py b/slixmpp/plugins/xep_0047/stanza.py index 91f17c1c..5c47508a 100644 --- a/slixmpp/plugins/xep_0047/stanza.py +++ b/slixmpp/plugins/xep_0047/stanza.py @@ -38,7 +38,7 @@ class Data(ElementBase): namespace = 'http://jabber.org/protocol/ibb' plugin_attrib = 'ibb_data' interfaces = {'seq', 'sid', 'data'} - sub_interfaces = set(['data']) + sub_interfaces = {'data'} def get_seq(self): return int(self._get_attr('seq', '0')) @@ -67,4 +67,4 @@ class Close(ElementBase): name = 'close' namespace = 'http://jabber.org/protocol/ibb' plugin_attrib = 'ibb_close' - interfaces = set(['sid']) + interfaces = {'sid'} diff --git a/slixmpp/plugins/xep_0048/bookmarks.py b/slixmpp/plugins/xep_0048/bookmarks.py index 10c0909e..bde7ef98 100644 --- a/slixmpp/plugins/xep_0048/bookmarks.py +++ b/slixmpp/plugins/xep_0048/bookmarks.py @@ -24,7 +24,7 @@ class XEP_0048(BasePlugin): name = 'xep_0048' description = 'XEP-0048: Bookmarks' - dependencies = set(['xep_0045', 'xep_0049', 'xep_0060', 'xep_0163', 'xep_0223']) + dependencies = {'xep_0045', 'xep_0049', 'xep_0060', 'xep_0163', 'xep_0223'} stanza = stanza default_config = { 'auto_join': False, diff --git a/slixmpp/plugins/xep_0048/stanza.py b/slixmpp/plugins/xep_0048/stanza.py index c158535a..ddcc8841 100644 --- a/slixmpp/plugins/xep_0048/stanza.py +++ b/slixmpp/plugins/xep_0048/stanza.py @@ -40,8 +40,8 @@ class Conference(ElementBase): namespace = 'storage:bookmarks' plugin_attrib = 'conference' plugin_multi_attrib = 'conferences' - interfaces = set(['nick', 'password', 'autojoin', 'jid', 'name']) - sub_interfaces = set(['nick', 'password']) + interfaces = {'nick', 'password', 'autojoin', 'jid', 'name'} + sub_interfaces = {'nick', 'password'} def get_autojoin(self): value = self._get_attr('autojoin') @@ -58,7 +58,7 @@ class URL(ElementBase): namespace = 'storage:bookmarks' plugin_attrib = 'url' plugin_multi_attrib = 'urls' - interfaces = set(['url', 'name']) + interfaces = {'url', 'name'} register_stanza_plugin(Bookmarks, Conference, iterable=True) diff --git a/slixmpp/plugins/xep_0049/private_storage.py b/slixmpp/plugins/xep_0049/private_storage.py index a66c05d1..cb92db51 100644 --- a/slixmpp/plugins/xep_0049/private_storage.py +++ b/slixmpp/plugins/xep_0049/private_storage.py @@ -23,7 +23,7 @@ class XEP_0049(BasePlugin): name = 'xep_0049' description = 'XEP-0049: Private XML Storage' - dependencies = set([]) + dependencies = {} stanza = stanza def plugin_init(self): diff --git a/slixmpp/plugins/xep_0050/adhoc.py b/slixmpp/plugins/xep_0050/adhoc.py index fa6017d5..795f3b81 100644 --- a/slixmpp/plugins/xep_0050/adhoc.py +++ b/slixmpp/plugins/xep_0050/adhoc.py @@ -74,7 +74,7 @@ class XEP_0050(BasePlugin): name = 'xep_0050' description = 'XEP-0050: Ad-Hoc Commands' - dependencies = set(['xep_0030', 'xep_0004']) + dependencies = {'xep_0030', 'xep_0004'} stanza = stanza default_config = { 'session_db': None @@ -225,8 +225,8 @@ class XEP_0050(BasePlugin): if len(payload) == 1: payload = payload[0] - interfaces = set([item.plugin_attrib for item in payload]) - payload_classes = set([item.__class__ for item in payload]) + interfaces = {item.plugin_attrib for item in payload} + payload_classes = {item.__class__ for item in payload} initial_session = {'id': sessionid, 'from': iq['from'], diff --git a/slixmpp/plugins/xep_0054/stanza.py b/slixmpp/plugins/xep_0054/stanza.py index e7647184..a0733ed1 100644 --- a/slixmpp/plugins/xep_0054/stanza.py +++ b/slixmpp/plugins/xep_0054/stanza.py @@ -10,15 +10,15 @@ class VCardTemp(ElementBase): name = 'vCard' namespace = 'vcard-temp' plugin_attrib = 'vcard_temp' - interfaces = set(['FN', 'VERSION']) - sub_interfaces = set(['FN', 'VERSION']) + interfaces = {'FN', 'VERSION'} + sub_interfaces = {'FN', 'VERSION'} class Name(ElementBase): name = 'N' namespace = 'vcard-temp' plugin_attrib = name - interfaces = set(['FAMILY', 'GIVEN', 'MIDDLE', 'PREFIX', 'SUFFIX']) + interfaces = {'FAMILY', 'GIVEN', 'MIDDLE', 'PREFIX', 'SUFFIX'} sub_interfaces = interfaces def _set_component(self, name, value): @@ -72,7 +72,7 @@ class Nickname(ElementBase): namespace = 'vcard-temp' plugin_attrib = name plugin_multi_attrib = 'nicknames' - interfaces = set([name]) + interfaces = {name} is_extension = True def set_nickname(self, value): @@ -95,9 +95,9 @@ class Email(ElementBase): namespace = 'vcard-temp' plugin_attrib = name plugin_multi_attrib = 'emails' - interfaces = set(['HOME', 'WORK', 'INTERNET', 'PREF', 'X400', 'USERID']) - sub_interfaces = set(['USERID']) - bool_interfaces = set(['HOME', 'WORK', 'INTERNET', 'PREF', 'X400']) + interfaces = {'HOME', 'WORK', 'INTERNET', 'PREF', 'X400', 'USERID'} + sub_interfaces = {'USERID'} + bool_interfaces = {'HOME', 'WORK', 'INTERNET', 'PREF', 'X400'} class Address(ElementBase): @@ -110,7 +110,7 @@ class Address(ElementBase): 'REGION', 'PCODE', 'CTRY']) sub_interfaces = set(['POBOX', 'EXTADD', 'STREET', 'LOCALITY', 'REGION', 'PCODE', 'CTRY']) - bool_interfaces = set(['HOME', 'WORK', 'DOM', 'INTL', 'PREF']) + bool_interfaces = {'HOME', 'WORK', 'DOM', 'INTL', 'PREF'} class Telephone(ElementBase): @@ -121,7 +121,7 @@ class Telephone(ElementBase): interfaces = set(['HOME', 'WORK', 'VOICE', 'FAX', 'PAGER', 'MSG', 'CELL', 'VIDEO', 'BBS', 'MODEM', 'ISDN', 'PCS', 'PREF', 'NUMBER']) - sub_interfaces = set(['NUMBER']) + sub_interfaces = {'NUMBER'} bool_interfaces = set(['HOME', 'WORK', 'VOICE', 'FAX', 'PAGER', 'MSG', 'CELL', 'VIDEO', 'BBS', 'MODEM', 'ISDN', 'PCS', 'PREF']) @@ -177,7 +177,7 @@ class Geo(ElementBase): namespace = 'vcard-temp' plugin_attrib = name plugin_multi_attrib = 'geolocations' - interfaces = set(['LAT', 'LON']) + interfaces = {'LAT', 'LON'} sub_interfaces = interfaces @@ -186,8 +186,8 @@ class Org(ElementBase): namespace = 'vcard-temp' plugin_attrib = name plugin_multi_attrib = 'organizations' - interfaces = set(['ORGNAME', 'ORGUNIT', 'orgunits']) - sub_interfaces = set(['ORGNAME', 'ORGUNIT']) + interfaces = {'ORGNAME', 'ORGUNIT', 'orgunits'} + sub_interfaces = {'ORGNAME', 'ORGUNIT'} def add_orgunit(self, value): orgunit = ET.Element('{%s}ORGUNIT' % self.namespace) @@ -218,7 +218,7 @@ class Photo(ElementBase): namespace = 'vcard-temp' plugin_attrib = name plugin_multi_attrib = 'photos' - interfaces = set(['TYPE', 'EXTVAL']) + interfaces = {'TYPE', 'EXTVAL'} sub_interfaces = interfaces @@ -227,7 +227,7 @@ class Logo(ElementBase): namespace = 'vcard-temp' plugin_attrib = name plugin_multi_attrib = 'logos' - interfaces = set(['TYPE', 'EXTVAL']) + interfaces = {'TYPE', 'EXTVAL'} sub_interfaces = interfaces @@ -236,7 +236,7 @@ class Sound(ElementBase): namespace = 'vcard-temp' plugin_attrib = name plugin_multi_attrib = 'sounds' - interfaces = set(['PHONETC', 'EXTVAL']) + interfaces = {'PHONETC', 'EXTVAL'} sub_interfaces = interfaces @@ -244,7 +244,7 @@ class BinVal(ElementBase): name = 'BINVAL' namespace = 'vcard-temp' plugin_attrib = name - interfaces = set(['BINVAL']) + interfaces = {'BINVAL'} is_extension = True def setup(self, xml=None): @@ -275,7 +275,7 @@ class Classification(ElementBase): namespace = 'vcard-temp' plugin_attrib = name plugin_multi_attrib = 'classifications' - interfaces = set(['PUBLIC', 'PRIVATE', 'CONFIDENTIAL']) + interfaces = {'PUBLIC', 'PRIVATE', 'CONFIDENTIAL'} bool_interfaces = interfaces @@ -284,7 +284,7 @@ class Categories(ElementBase): namespace = 'vcard-temp' plugin_attrib = name plugin_multi_attrib = 'categories' - interfaces = set([name]) + interfaces = {name} is_extension = True def set_categories(self, values): @@ -314,7 +314,7 @@ class Birthday(ElementBase): namespace = 'vcard-temp' plugin_attrib = name plugin_multi_attrib = 'birthdays' - interfaces = set([name]) + interfaces = {name} is_extension = True def set_bday(self, value): @@ -336,7 +336,7 @@ class Rev(ElementBase): namespace = 'vcard-temp' plugin_attrib = name plugin_multi_attrib = 'revision_dates' - interfaces = set([name]) + interfaces = {name} is_extension = True def set_rev(self, value): @@ -358,7 +358,7 @@ class Title(ElementBase): namespace = 'vcard-temp' plugin_attrib = name plugin_multi_attrib = 'titles' - interfaces = set([name]) + interfaces = {name} is_extension = True def set_title(self, value): @@ -373,7 +373,7 @@ class Role(ElementBase): namespace = 'vcard-temp' plugin_attrib = name plugin_multi_attrib = 'roles' - interfaces = set([name]) + interfaces = {name} is_extension = True def set_role(self, value): @@ -388,7 +388,7 @@ class Note(ElementBase): namespace = 'vcard-temp' plugin_attrib = name plugin_multi_attrib = 'notes' - interfaces = set([name]) + interfaces = {name} is_extension = True def set_note(self, value): @@ -403,7 +403,7 @@ class Desc(ElementBase): namespace = 'vcard-temp' plugin_attrib = name plugin_multi_attrib = 'descriptions' - interfaces = set([name]) + interfaces = {name} is_extension = True def set_desc(self, value): @@ -418,7 +418,7 @@ class URL(ElementBase): namespace = 'vcard-temp' plugin_attrib = name plugin_multi_attrib = 'urls' - interfaces = set([name]) + interfaces = {name} is_extension = True def set_url(self, value): @@ -433,7 +433,7 @@ class UID(ElementBase): namespace = 'vcard-temp' plugin_attrib = name plugin_multi_attrib = 'uids' - interfaces = set([name]) + interfaces = {name} is_extension = True def set_uid(self, value): @@ -448,7 +448,7 @@ class ProdID(ElementBase): namespace = 'vcard-temp' plugin_attrib = name plugin_multi_attrib = 'product_ids' - interfaces = set([name]) + interfaces = {name} is_extension = True def set_prodid(self, value): @@ -463,7 +463,7 @@ class Mailer(ElementBase): namespace = 'vcard-temp' plugin_attrib = name plugin_multi_attrib = 'mailers' - interfaces = set([name]) + interfaces = {name} is_extension = True def set_mailer(self, value): @@ -478,7 +478,7 @@ class SortString(ElementBase): namespace = 'vcard-temp' plugin_attrib = 'SORT_STRING' plugin_multi_attrib = 'sort_strings' - interfaces = set([name]) + interfaces = {name} is_extension = True def set_sort_string(self, value): @@ -493,7 +493,7 @@ class Agent(ElementBase): namespace = 'vcard-temp' plugin_attrib = name plugin_multi_attrib = 'agents' - interfaces = set(['EXTVAL']) + interfaces = {'EXTVAL'} sub_interfaces = interfaces @@ -502,7 +502,7 @@ class JabberID(ElementBase): namespace = 'vcard-temp' plugin_attrib = name plugin_multi_attrib = 'jids' - interfaces = set([name]) + interfaces = {name} is_extension = True def set_jabberid(self, value): @@ -517,7 +517,7 @@ class TimeZone(ElementBase): namespace = 'vcard-temp' plugin_attrib = name plugin_multi_attrib = 'timezones' - interfaces = set([name]) + interfaces = {name} is_extension = True def set_tz(self, value): diff --git a/slixmpp/plugins/xep_0054/vcard_temp.py b/slixmpp/plugins/xep_0054/vcard_temp.py index f0173386..098b0e34 100644 --- a/slixmpp/plugins/xep_0054/vcard_temp.py +++ b/slixmpp/plugins/xep_0054/vcard_temp.py @@ -29,7 +29,7 @@ class XEP_0054(BasePlugin): name = 'xep_0054' description = 'XEP-0054: vcard-temp' - dependencies = set(['xep_0030', 'xep_0082']) + dependencies = {'xep_0030', 'xep_0082'} stanza = stanza def plugin_init(self): diff --git a/slixmpp/plugins/xep_0059/rsm.py b/slixmpp/plugins/xep_0059/rsm.py index 5876a9aa..a02d94e0 100644 --- a/slixmpp/plugins/xep_0059/rsm.py +++ b/slixmpp/plugins/xep_0059/rsm.py @@ -111,7 +111,7 @@ class XEP_0059(BasePlugin): name = 'xep_0059' description = 'XEP-0059: Result Set Management' - dependencies = set(['xep_0030']) + dependencies = {'xep_0030'} stanza = stanza def plugin_init(self): diff --git a/slixmpp/plugins/xep_0060/pubsub.py b/slixmpp/plugins/xep_0060/pubsub.py index 8e12ae92..8d6a2877 100644 --- a/slixmpp/plugins/xep_0060/pubsub.py +++ b/slixmpp/plugins/xep_0060/pubsub.py @@ -26,7 +26,7 @@ class XEP_0060(BasePlugin): name = 'xep_0060' description = 'XEP-0060: Publish-Subscribe' - dependencies = set(['xep_0030', 'xep_0004', 'xep_0082', 'xep_0131']) + dependencies = {'xep_0030', 'xep_0004', 'xep_0082', 'xep_0131'} stanza = stanza def plugin_init(self): diff --git a/slixmpp/plugins/xep_0065/proxy.py b/slixmpp/plugins/xep_0065/proxy.py index c5d358dd..55c81485 100644 --- a/slixmpp/plugins/xep_0065/proxy.py +++ b/slixmpp/plugins/xep_0065/proxy.py @@ -22,7 +22,7 @@ class XEP_0065(BasePlugin): name = 'xep_0065' description = "XEP-0065: SOCKS5 Bytestreams" - dependencies = set(['xep_0030']) + dependencies = {'xep_0030'} default_config = { 'auto_accept': False } diff --git a/slixmpp/plugins/xep_0065/stanza.py b/slixmpp/plugins/xep_0065/stanza.py index 5ba15b32..9701c237 100644 --- a/slixmpp/plugins/xep_0065/stanza.py +++ b/slixmpp/plugins/xep_0065/stanza.py @@ -6,8 +6,8 @@ class Socks5(ElementBase): name = 'query' namespace = 'http://jabber.org/protocol/bytestreams' plugin_attrib = 'socks' - interfaces = set(['sid', 'activate']) - sub_interfaces = set(['activate']) + interfaces = {'sid', 'activate'} + sub_interfaces = {'activate'} def add_streamhost(self, jid, host, port): sh = StreamHost(parent=self) @@ -21,7 +21,7 @@ class StreamHost(ElementBase): namespace = 'http://jabber.org/protocol/bytestreams' plugin_attrib = 'streamhost' plugin_multi_attrib = 'streamhosts' - interfaces = set(['host', 'jid', 'port']) + interfaces = {'host', 'jid', 'port'} def set_jid(self, value): return self._set_attr('jid', str(value)) @@ -34,7 +34,7 @@ class StreamHostUsed(ElementBase): name = 'streamhost-used' namespace = 'http://jabber.org/protocol/bytestreams' plugin_attrib = 'streamhost_used' - interfaces = set(['jid']) + interfaces = {'jid'} def set_jid(self, value): return self._set_attr('jid', str(value)) diff --git a/slixmpp/plugins/xep_0066/oob.py b/slixmpp/plugins/xep_0066/oob.py index c9d4ae5b..233263a2 100644 --- a/slixmpp/plugins/xep_0066/oob.py +++ b/slixmpp/plugins/xep_0066/oob.py @@ -44,7 +44,7 @@ class XEP_0066(BasePlugin): name = 'xep_0066' description = 'XEP-0066: Out of Band Data' - dependencies = set(['xep_0030']) + dependencies = {'xep_0030'} stanza = stanza def plugin_init(self): diff --git a/slixmpp/plugins/xep_0071/stanza.py b/slixmpp/plugins/xep_0071/stanza.py index 3df686cf..4c3380c4 100644 --- a/slixmpp/plugins/xep_0071/stanza.py +++ b/slixmpp/plugins/xep_0071/stanza.py @@ -19,8 +19,8 @@ class XHTML_IM(ElementBase): namespace = 'http://jabber.org/protocol/xhtml-im' name = 'html' - interfaces = set(['body']) - lang_interfaces = set(['body']) + interfaces = {'body'} + lang_interfaces = {'body'} plugin_attrib = name def set_body(self, content, lang=None): diff --git a/slixmpp/plugins/xep_0071/xhtml_im.py b/slixmpp/plugins/xep_0071/xhtml_im.py index 0b412126..ff4cf591 100644 --- a/slixmpp/plugins/xep_0071/xhtml_im.py +++ b/slixmpp/plugins/xep_0071/xhtml_im.py @@ -17,7 +17,7 @@ class XEP_0071(BasePlugin): name = 'xep_0071' description = 'XEP-0071: XHTML-IM' - dependencies = set(['xep_0030']) + dependencies = {'xep_0030'} stanza = stanza def plugin_init(self): diff --git a/slixmpp/plugins/xep_0077/register.py b/slixmpp/plugins/xep_0077/register.py index eb2e7443..8c0c6f09 100644 --- a/slixmpp/plugins/xep_0077/register.py +++ b/slixmpp/plugins/xep_0077/register.py @@ -26,7 +26,7 @@ class XEP_0077(BasePlugin): name = 'xep_0077' description = 'XEP-0077: In-Band Registration' - dependencies = set(['xep_0004', 'xep_0066']) + dependencies = {'xep_0004', 'xep_0066'} stanza = stanza default_config = { 'create_account': True, diff --git a/slixmpp/plugins/xep_0079/amp.py b/slixmpp/plugins/xep_0079/amp.py index 6e65d02a..a8fbc258 100644 --- a/slixmpp/plugins/xep_0079/amp.py +++ b/slixmpp/plugins/xep_0079/amp.py @@ -27,7 +27,7 @@ class XEP_0079(BasePlugin): name = 'xep_0079' description = 'XEP-0079: Advanced Message Processing' - dependencies = set(['xep_0030']) + dependencies = {'xep_0030'} stanza = stanza def plugin_init(self): diff --git a/slixmpp/plugins/xep_0079/stanza.py b/slixmpp/plugins/xep_0079/stanza.py index e3e1553a..27480fd6 100644 --- a/slixmpp/plugins/xep_0079/stanza.py +++ b/slixmpp/plugins/xep_0079/stanza.py @@ -15,7 +15,7 @@ class AMP(ElementBase): namespace = 'http://jabber.org/protocol/amp' name = 'amp' plugin_attrib = 'amp' - interfaces = set(['from', 'to', 'status', 'per_hop']) + interfaces = {'from', 'to', 'status', 'per_hop'} def get_from(self): return JID(self._get_attr('from')) @@ -53,7 +53,7 @@ class Rule(ElementBase): name = 'rule' plugin_attrib = name plugin_multi_attrib = 'rules' - interfaces = set(['action', 'condition', 'value']) + interfaces = {'action', 'condition', 'value'} class InvalidRules(ElementBase): diff --git a/slixmpp/plugins/xep_0080/geoloc.py b/slixmpp/plugins/xep_0080/geoloc.py index c9d97edb..459d8a91 100644 --- a/slixmpp/plugins/xep_0080/geoloc.py +++ b/slixmpp/plugins/xep_0080/geoloc.py @@ -25,7 +25,7 @@ class XEP_0080(BasePlugin): name = 'xep_0080' description = 'XEP-0080: User Location' - dependencies = set(['xep_0163']) + dependencies = {'xep_0163'} stanza = stanza def plugin_end(self): diff --git a/slixmpp/plugins/xep_0084/avatar.py b/slixmpp/plugins/xep_0084/avatar.py index e5f9dfaa..6ab4d24b 100644 --- a/slixmpp/plugins/xep_0084/avatar.py +++ b/slixmpp/plugins/xep_0084/avatar.py @@ -24,7 +24,7 @@ class XEP_0084(BasePlugin): name = 'xep_0084' description = 'XEP-0084: User Avatar' - dependencies = set(['xep_0163', 'xep_0060']) + dependencies = {'xep_0163', 'xep_0060'} stanza = stanza def plugin_init(self): diff --git a/slixmpp/plugins/xep_0084/stanza.py b/slixmpp/plugins/xep_0084/stanza.py index ebcd73e3..4b6370ce 100644 --- a/slixmpp/plugins/xep_0084/stanza.py +++ b/slixmpp/plugins/xep_0084/stanza.py @@ -16,7 +16,7 @@ class Data(ElementBase): name = 'data' namespace = 'urn:xmpp:avatar:data' plugin_attrib = 'avatar_data' - interfaces = set(['value']) + interfaces = {'value'} def get_value(self): if self.xml.text: @@ -63,7 +63,7 @@ class Info(ElementBase): namespace = 'urn:xmpp:avatar:metadata' plugin_attrib = 'info' plugin_multi_attrib = 'items' - interfaces = set(['bytes', 'height', 'id', 'type', 'url', 'width']) + interfaces = {'bytes', 'height', 'id', 'type', 'url', 'width'} class Pointer(ElementBase): diff --git a/slixmpp/plugins/xep_0085/chat_states.py b/slixmpp/plugins/xep_0085/chat_states.py index 1aab9eaa..ade6eda9 100644 --- a/slixmpp/plugins/xep_0085/chat_states.py +++ b/slixmpp/plugins/xep_0085/chat_states.py @@ -28,7 +28,7 @@ class XEP_0085(BasePlugin): name = 'xep_0085' description = 'XEP-0085: Chat State Notifications' - dependencies = set(['xep_0030']) + dependencies = {'xep_0030'} stanza = stanza def plugin_init(self): diff --git a/slixmpp/plugins/xep_0092/version.py b/slixmpp/plugins/xep_0092/version.py index ff0317da..839f740d 100644 --- a/slixmpp/plugins/xep_0092/version.py +++ b/slixmpp/plugins/xep_0092/version.py @@ -28,7 +28,7 @@ class XEP_0092(BasePlugin): name = 'xep_0092' description = 'XEP-0092: Software Version' - dependencies = set(['xep_0030']) + dependencies = {'xep_0030'} stanza = stanza default_config = { 'software_name': 'Slixmpp', diff --git a/slixmpp/plugins/xep_0095/stanza.py b/slixmpp/plugins/xep_0095/stanza.py index 62b5f6f8..0a99ddf6 100644 --- a/slixmpp/plugins/xep_0095/stanza.py +++ b/slixmpp/plugins/xep_0095/stanza.py @@ -13,7 +13,7 @@ class SI(ElementBase): name = 'si' namespace = 'http://jabber.org/protocol/si' plugin_attrib = 'si' - interfaces = set(['id', 'mime_type', 'profile']) + interfaces = {'id', 'mime_type', 'profile'} def get_mime_type(self): return self._get_attr('mime-type', 'application/octet-stream') diff --git a/slixmpp/plugins/xep_0095/stream_initiation.py b/slixmpp/plugins/xep_0095/stream_initiation.py index 3f909d93..d135ecba 100644 --- a/slixmpp/plugins/xep_0095/stream_initiation.py +++ b/slixmpp/plugins/xep_0095/stream_initiation.py @@ -31,7 +31,7 @@ class XEP_0095(BasePlugin): name = 'xep_0095' description = 'XEP-0095: Stream Initiation' - dependencies = set(['xep_0020', 'xep_0030', 'xep_0047', 'xep_0065']) + dependencies = {'xep_0020', 'xep_0030', 'xep_0047', 'xep_0065'} stanza = stanza def plugin_init(self): diff --git a/slixmpp/plugins/xep_0096/file_transfer.py b/slixmpp/plugins/xep_0096/file_transfer.py index 3c09a5b5..f136772d 100644 --- a/slixmpp/plugins/xep_0096/file_transfer.py +++ b/slixmpp/plugins/xep_0096/file_transfer.py @@ -23,7 +23,7 @@ class XEP_0096(BasePlugin): name = 'xep_0096' description = 'XEP-0096: SI File Transfer' - dependencies = set(['xep_0095']) + dependencies = {'xep_0095'} stanza = stanza def plugin_init(self): diff --git a/slixmpp/plugins/xep_0096/stanza.py b/slixmpp/plugins/xep_0096/stanza.py index d3781c8d..2a1a9060 100644 --- a/slixmpp/plugins/xep_0096/stanza.py +++ b/slixmpp/plugins/xep_0096/stanza.py @@ -16,8 +16,8 @@ class File(ElementBase): name = 'file' namespace = 'http://jabber.org/protocol/si/profile/file-transfer' plugin_attrib = 'file' - interfaces = set(['name', 'size', 'date', 'hash', 'desc']) - sub_interfaces = set(['desc']) + interfaces = {'name', 'size', 'date', 'hash', 'desc'} + sub_interfaces = {'desc'} def set_size(self, value): self._set_attr('size', str(value)) @@ -36,7 +36,7 @@ class Range(ElementBase): name = 'range' namespace = 'http://jabber.org/protocol/si/profile/file-transfer' plugin_attrib = 'range' - interfaces = set(['length', 'offset']) + interfaces = {'length', 'offset'} def set_length(self, value): self._set_attr('length', str(value)) diff --git a/slixmpp/plugins/xep_0106.py b/slixmpp/plugins/xep_0106.py index a4717956..bcf4c555 100644 --- a/slixmpp/plugins/xep_0106.py +++ b/slixmpp/plugins/xep_0106.py @@ -14,7 +14,7 @@ class XEP_0106(BasePlugin): name = 'xep_0106' description = 'XEP-0106: JID Escaping' - dependencies = set(['xep_0030']) + dependencies = {'xep_0030'} def session_bind(self, jid): self.xmpp['xep_0030'].add_feature(feature='jid\\20escaping') diff --git a/slixmpp/plugins/xep_0107/stanza.py b/slixmpp/plugins/xep_0107/stanza.py index 05967de9..ea5a799a 100644 --- a/slixmpp/plugins/xep_0107/stanza.py +++ b/slixmpp/plugins/xep_0107/stanza.py @@ -14,8 +14,8 @@ class UserMood(ElementBase): name = 'mood' namespace = 'http://jabber.org/protocol/mood' plugin_attrib = 'mood' - interfaces = set(['value', 'text']) - sub_interfaces = set(['text']) + interfaces = {'value', 'text'} + sub_interfaces = {'text'} moods = set(['afraid', 'amazed', 'amorous', 'angry', 'annoyed', 'anxious', 'aroused', 'ashamed', 'bored', 'brave', 'calm', 'cautious', 'cold', 'confident', 'confused', 'contemplative', 'contented', diff --git a/slixmpp/plugins/xep_0107/user_mood.py b/slixmpp/plugins/xep_0107/user_mood.py index c56d15fa..c745671f 100644 --- a/slixmpp/plugins/xep_0107/user_mood.py +++ b/slixmpp/plugins/xep_0107/user_mood.py @@ -27,7 +27,7 @@ class XEP_0107(BasePlugin): name = 'xep_0107' description = 'XEP-0107: User Mood' - dependencies = set(['xep_0163']) + dependencies = {'xep_0163'} stanza = stanza def plugin_init(self): diff --git a/slixmpp/plugins/xep_0108/stanza.py b/slixmpp/plugins/xep_0108/stanza.py index d65dfdf9..a614e2de 100644 --- a/slixmpp/plugins/xep_0108/stanza.py +++ b/slixmpp/plugins/xep_0108/stanza.py @@ -14,8 +14,8 @@ class UserActivity(ElementBase): name = 'activity' namespace = 'http://jabber.org/protocol/activity' plugin_attrib = 'activity' - interfaces = set(['value', 'text']) - sub_interfaces = set(['text']) + interfaces = {'value', 'text'} + sub_interfaces = {'text'} general = set(['doing_chores', 'drinking', 'eating', 'exercising', 'grooming', 'having_appointment', 'inactive', 'relaxing', 'talking', 'traveling', 'undefined', 'working']) diff --git a/slixmpp/plugins/xep_0108/user_activity.py b/slixmpp/plugins/xep_0108/user_activity.py index 502dfae0..d66ed9c4 100644 --- a/slixmpp/plugins/xep_0108/user_activity.py +++ b/slixmpp/plugins/xep_0108/user_activity.py @@ -23,7 +23,7 @@ class XEP_0108(BasePlugin): name = 'xep_0108' description = 'XEP-0108: User Activity' - dependencies = set(['xep_0163']) + dependencies = {'xep_0163'} stanza = stanza def plugin_end(self): diff --git a/slixmpp/plugins/xep_0115/caps.py b/slixmpp/plugins/xep_0115/caps.py index c6f9ea10..131d269b 100644 --- a/slixmpp/plugins/xep_0115/caps.py +++ b/slixmpp/plugins/xep_0115/caps.py @@ -32,7 +32,7 @@ class XEP_0115(BasePlugin): name = 'xep_0115' description = 'XEP-0115: Entity Capabilities' - dependencies = set(['xep_0030', 'xep_0128', 'xep_0004']) + dependencies = {'xep_0030', 'xep_0128', 'xep_0004'} stanza = stanza default_config = { 'hash': 'sha-1', diff --git a/slixmpp/plugins/xep_0118/user_tune.py b/slixmpp/plugins/xep_0118/user_tune.py index 0882a5ba..8b64eaf7 100644 --- a/slixmpp/plugins/xep_0118/user_tune.py +++ b/slixmpp/plugins/xep_0118/user_tune.py @@ -23,7 +23,7 @@ class XEP_0118(BasePlugin): name = 'xep_0118' description = 'XEP-0118: User Tune' - dependencies = set(['xep_0163']) + dependencies = {'xep_0163'} stanza = stanza def plugin_end(self): diff --git a/slixmpp/plugins/xep_0122/data_validation.py b/slixmpp/plugins/xep_0122/data_validation.py index 6129db51..65e7b3e3 100644 --- a/slixmpp/plugins/xep_0122/data_validation.py +++ b/slixmpp/plugins/xep_0122/data_validation.py @@ -12,7 +12,7 @@ class XEP_0122(BasePlugin): name = 'xep_0122' description = 'XEP-0122: Data Forms Validation' - dependencies = set(['xep_0004']) + dependencies = {'xep_0004'} stanza = stanza def plugin_init(self): diff --git a/slixmpp/plugins/xep_0128/extended_disco.py b/slixmpp/plugins/xep_0128/extended_disco.py index 5cc1d35a..bf3971e3 100644 --- a/slixmpp/plugins/xep_0128/extended_disco.py +++ b/slixmpp/plugins/xep_0128/extended_disco.py @@ -41,7 +41,7 @@ class XEP_0128(BasePlugin): name = 'xep_0128' description = 'XEP-0128: Service Discovery Extensions' - dependencies = set(['xep_0030', 'xep_0004']) + dependencies = {'xep_0030', 'xep_0004'} def plugin_init(self): """Start the XEP-0128 plugin.""" diff --git a/slixmpp/plugins/xep_0131/headers.py b/slixmpp/plugins/xep_0131/headers.py index 81fc9188..978c490d 100644 --- a/slixmpp/plugins/xep_0131/headers.py +++ b/slixmpp/plugins/xep_0131/headers.py @@ -17,7 +17,7 @@ class XEP_0131(BasePlugin): name = 'xep_0131' description = 'XEP-0131: Stanza Headers and Internet Metadata' - dependencies = set(['xep_0030']) + dependencies = {'xep_0030'} stanza = stanza default_config = { 'supported_headers': set() diff --git a/slixmpp/plugins/xep_0131/stanza.py b/slixmpp/plugins/xep_0131/stanza.py index cbbe61a7..d075c15e 100644 --- a/slixmpp/plugins/xep_0131/stanza.py +++ b/slixmpp/plugins/xep_0131/stanza.py @@ -14,7 +14,7 @@ class Headers(ElementBase): name = 'headers' namespace = 'http://jabber.org/protocol/shim' plugin_attrib = 'headers' - interfaces = set(['headers']) + interfaces = {'headers'} is_extension = True def get_headers(self): diff --git a/slixmpp/plugins/xep_0133.py b/slixmpp/plugins/xep_0133.py index a1eb9e02..e45d228f 100644 --- a/slixmpp/plugins/xep_0133.py +++ b/slixmpp/plugins/xep_0133.py @@ -14,7 +14,7 @@ class XEP_0133(BasePlugin): name = 'xep_0133' description = 'XEP-0133: Service Administration' - dependencies = set(['xep_0030', 'xep_0004', 'xep_0050']) + dependencies = {'xep_0030', 'xep_0004', 'xep_0050'} commands = set(['add-user', 'delete-user', 'disable-user', 'reenable-user', 'end-user-session', 'get-user-password', 'change-user-password', 'get-user-roster', diff --git a/slixmpp/plugins/xep_0138.py b/slixmpp/plugins/xep_0138.py index ced81478..4780f8ee 100644 --- a/slixmpp/plugins/xep_0138.py +++ b/slixmpp/plugins/xep_0138.py @@ -95,7 +95,7 @@ class XEP_0138(BasePlugin): """ name = "xep_0138" description = "XEP-0138: Compression" - dependencies = set(["xep_0030"]) + dependencies = {"xep_0030"} def plugin_init(self): self.xep = '0138' diff --git a/slixmpp/plugins/xep_0152/reachability.py b/slixmpp/plugins/xep_0152/reachability.py index e6d94b65..3ff5e118 100644 --- a/slixmpp/plugins/xep_0152/reachability.py +++ b/slixmpp/plugins/xep_0152/reachability.py @@ -23,7 +23,7 @@ class XEP_0152(BasePlugin): name = 'xep_0152' description = 'XEP-0152: Reachability Addresses' - dependencies = set(['xep_0163']) + dependencies = {'xep_0163'} stanza = stanza def plugin_end(self): diff --git a/slixmpp/plugins/xep_0152/stanza.py b/slixmpp/plugins/xep_0152/stanza.py index 661544e3..cbf725fa 100644 --- a/slixmpp/plugins/xep_0152/stanza.py +++ b/slixmpp/plugins/xep_0152/stanza.py @@ -21,9 +21,9 @@ class Address(ElementBase): namespace = 'urn:xmpp:reach:0' plugin_attrib = 'address' plugin_multi_attrib = 'addresses' - interfaces = set(['uri', 'desc']) - lang_interfaces = set(['desc']) - sub_interfaces = set(['desc']) + interfaces = {'uri', 'desc'} + lang_interfaces = {'desc'} + sub_interfaces = {'desc'} register_stanza_plugin(Reachability, Address, iterable=True) diff --git a/slixmpp/plugins/xep_0153/stanza.py b/slixmpp/plugins/xep_0153/stanza.py index fe8d5e98..9d0c51da 100644 --- a/slixmpp/plugins/xep_0153/stanza.py +++ b/slixmpp/plugins/xep_0153/stanza.py @@ -13,7 +13,7 @@ class VCardTempUpdate(ElementBase): name = 'x' namespace = 'vcard-temp:x:update' plugin_attrib = 'vcard_temp_update' - interfaces = set(['photo']) + interfaces = {'photo'} sub_interfaces = interfaces def set_photo(self, value): diff --git a/slixmpp/plugins/xep_0153/vcard_avatar.py b/slixmpp/plugins/xep_0153/vcard_avatar.py index b2c4caf5..f1591e27 100644 --- a/slixmpp/plugins/xep_0153/vcard_avatar.py +++ b/slixmpp/plugins/xep_0153/vcard_avatar.py @@ -24,7 +24,7 @@ class XEP_0153(BasePlugin): name = 'xep_0153' description = 'XEP-0153: vCard-Based Avatars' - dependencies = set(['xep_0054']) + dependencies = {'xep_0054'} stanza = stanza def plugin_init(self): diff --git a/slixmpp/plugins/xep_0163.py b/slixmpp/plugins/xep_0163.py index b85c662c..5832b4ee 100644 --- a/slixmpp/plugins/xep_0163.py +++ b/slixmpp/plugins/xep_0163.py @@ -24,7 +24,7 @@ class XEP_0163(BasePlugin): name = 'xep_0163' description = 'XEP-0163: Personal Eventing Protocol (PEP)' - dependencies = set(['xep_0030', 'xep_0060', 'xep_0115']) + dependencies = {'xep_0030', 'xep_0060', 'xep_0115'} def register_pep(self, name, stanza): """ diff --git a/slixmpp/plugins/xep_0172/user_nick.py b/slixmpp/plugins/xep_0172/user_nick.py index b9f20b27..0bba8611 100644 --- a/slixmpp/plugins/xep_0172/user_nick.py +++ b/slixmpp/plugins/xep_0172/user_nick.py @@ -28,7 +28,7 @@ class XEP_0172(BasePlugin): name = 'xep_0172' description = 'XEP-0172: User Nickname' - dependencies = set(['xep_0163']) + dependencies = {'xep_0163'} stanza = stanza def plugin_init(self): diff --git a/slixmpp/plugins/xep_0184/receipt.py b/slixmpp/plugins/xep_0184/receipt.py index 2c3555dc..f89a5d9b 100644 --- a/slixmpp/plugins/xep_0184/receipt.py +++ b/slixmpp/plugins/xep_0184/receipt.py @@ -24,7 +24,7 @@ class XEP_0184(BasePlugin): name = 'xep_0184' description = 'XEP-0184: Message Delivery Receipts' - dependencies = set(['xep_0030']) + dependencies = {'xep_0030'} stanza = stanza default_config = { 'auto_ack': True, diff --git a/slixmpp/plugins/xep_0184/stanza.py b/slixmpp/plugins/xep_0184/stanza.py index 1116eef9..26e289a3 100644 --- a/slixmpp/plugins/xep_0184/stanza.py +++ b/slixmpp/plugins/xep_0184/stanza.py @@ -45,7 +45,7 @@ class Received(ElementBase): namespace = 'urn:xmpp:receipts' name = 'received' plugin_attrib = 'receipt' - interfaces = set(['receipt']) + interfaces = {'receipt'} sub_interfaces = interfaces is_extension = True diff --git a/slixmpp/plugins/xep_0186/invisible_command.py b/slixmpp/plugins/xep_0186/invisible_command.py index 88266f6e..a6df59a2 100644 --- a/slixmpp/plugins/xep_0186/invisible_command.py +++ b/slixmpp/plugins/xep_0186/invisible_command.py @@ -21,7 +21,7 @@ class XEP_0186(BasePlugin): name = 'xep_0186' description = 'XEP-0186: Invisible Command' - dependencies = set(['xep_0030']) + dependencies = {'xep_0030'} def plugin_init(self): register_stanza_plugin(Iq, Visible) diff --git a/slixmpp/plugins/xep_0191/blocking.py b/slixmpp/plugins/xep_0191/blocking.py index fa2a013e..5425544d 100644 --- a/slixmpp/plugins/xep_0191/blocking.py +++ b/slixmpp/plugins/xep_0191/blocking.py @@ -23,7 +23,7 @@ class XEP_0191(BasePlugin): name = 'xep_0191' description = 'XEP-0191: Blocking Command' - dependencies = set(['xep_0030']) + dependencies = {'xep_0030'} stanza = stanza def plugin_init(self): diff --git a/slixmpp/plugins/xep_0191/stanza.py b/slixmpp/plugins/xep_0191/stanza.py index 4dac7bfc..0cf5c71a 100644 --- a/slixmpp/plugins/xep_0191/stanza.py +++ b/slixmpp/plugins/xep_0191/stanza.py @@ -13,7 +13,7 @@ class BlockList(ElementBase): name = 'blocklist' namespace = 'urn:xmpp:blocking' plugin_attrib = 'blocklist' - interfaces = set(['items']) + interfaces = {'items'} def get_items(self): result = set() diff --git a/slixmpp/plugins/xep_0196/user_gaming.py b/slixmpp/plugins/xep_0196/user_gaming.py index f0dee99f..5a573ea9 100644 --- a/slixmpp/plugins/xep_0196/user_gaming.py +++ b/slixmpp/plugins/xep_0196/user_gaming.py @@ -23,7 +23,7 @@ class XEP_0196(BasePlugin): name = 'xep_0196' description = 'XEP-0196: User Gaming' - dependencies = set(['xep_0163']) + dependencies = {'xep_0163'} stanza = stanza def plugin_end(self): diff --git a/slixmpp/plugins/xep_0198/stanza.py b/slixmpp/plugins/xep_0198/stanza.py index 5b13293b..37560227 100644 --- a/slixmpp/plugins/xep_0198/stanza.py +++ b/slixmpp/plugins/xep_0198/stanza.py @@ -13,7 +13,7 @@ from slixmpp.xmlstream import ElementBase, StanzaBase class Enable(StanzaBase): name = 'enable' namespace = 'urn:xmpp:sm:3' - interfaces = set(['max', 'resume']) + interfaces = {'max', 'resume'} def setup(self, xml): StanzaBase.setup(self, xml) @@ -30,7 +30,7 @@ class Enable(StanzaBase): class Enabled(StanzaBase): name = 'enabled' namespace = 'urn:xmpp:sm:3' - interfaces = set(['id', 'location', 'max', 'resume']) + interfaces = {'id', 'location', 'max', 'resume'} def setup(self, xml): StanzaBase.setup(self, xml) @@ -47,7 +47,7 @@ class Enabled(StanzaBase): class Resume(StanzaBase): name = 'resume' namespace = 'urn:xmpp:sm:3' - interfaces = set(['h', 'previd']) + interfaces = {'h', 'previd'} def setup(self, xml): StanzaBase.setup(self, xml) @@ -66,7 +66,7 @@ class Resume(StanzaBase): class Resumed(StanzaBase): name = 'resumed' namespace = 'urn:xmpp:sm:3' - interfaces = set(['h', 'previd']) + interfaces = {'h', 'previd'} def setup(self, xml): StanzaBase.setup(self, xml) @@ -96,7 +96,7 @@ class StreamManagement(ElementBase): name = 'sm' namespace = 'urn:xmpp:sm:3' plugin_attrib = name - interfaces = set(['required', 'optional']) + interfaces = {'required', 'optional'} def get_required(self): return self.xml.find('{%s}required' % self.namespace) is not None @@ -134,7 +134,7 @@ class RequestAck(StanzaBase): class Ack(StanzaBase): name = 'a' namespace = 'urn:xmpp:sm:3' - interfaces = set(['h']) + interfaces = {'h'} def setup(self, xml): StanzaBase.setup(self, xml) diff --git a/slixmpp/plugins/xep_0199/ping.py b/slixmpp/plugins/xep_0199/ping.py index 8594ac01..9bd595a4 100644 --- a/slixmpp/plugins/xep_0199/ping.py +++ b/slixmpp/plugins/xep_0199/ping.py @@ -50,7 +50,7 @@ class XEP_0199(BasePlugin): name = 'xep_0199' description = 'XEP-0199: XMPP Ping' - dependencies = set(['xep_0030']) + dependencies = {'xep_0030'} stanza = stanza default_config = { 'keepalive': False, diff --git a/slixmpp/plugins/xep_0202/time.py b/slixmpp/plugins/xep_0202/time.py index 185200fc..05df6374 100644 --- a/slixmpp/plugins/xep_0202/time.py +++ b/slixmpp/plugins/xep_0202/time.py @@ -28,7 +28,7 @@ class XEP_0202(BasePlugin): name = 'xep_0202' description = 'XEP-0202: Entity Time' - dependencies = set(['xep_0030', 'xep_0082']) + dependencies = {'xep_0030', 'xep_0082'} stanza = stanza default_config = { #: As a default, respond to time requests with the diff --git a/slixmpp/plugins/xep_0221/media.py b/slixmpp/plugins/xep_0221/media.py index 4c34fbd2..628a3b05 100644 --- a/slixmpp/plugins/xep_0221/media.py +++ b/slixmpp/plugins/xep_0221/media.py @@ -21,7 +21,7 @@ class XEP_0221(BasePlugin): name = 'xep_0221' description = 'XEP-0221: Data Forms Media Element' - dependencies = set(['xep_0004']) + dependencies = {'xep_0004'} def plugin_init(self): register_stanza_plugin(FormField, Media) diff --git a/slixmpp/plugins/xep_0221/stanza.py b/slixmpp/plugins/xep_0221/stanza.py index 2a2bbabd..4dad0eef 100644 --- a/slixmpp/plugins/xep_0221/stanza.py +++ b/slixmpp/plugins/xep_0221/stanza.py @@ -13,7 +13,7 @@ class Media(ElementBase): name = 'media' namespace = 'urn:xmpp:media-element' plugin_attrib = 'media' - interfaces = set(['height', 'width', 'alt']) + interfaces = {'height', 'width', 'alt'} def add_uri(self, value, itype): uri = URI() @@ -27,7 +27,7 @@ class URI(ElementBase): namespace = 'urn:xmpp:media-element' plugin_attrib = 'uri' plugin_multi_attrib = 'uris' - interfaces = set(['type', 'value']) + interfaces = {'type', 'value'} def get_value(self): return self.xml.text diff --git a/slixmpp/plugins/xep_0222.py b/slixmpp/plugins/xep_0222.py index 059f4c85..7ac7183b 100644 --- a/slixmpp/plugins/xep_0222.py +++ b/slixmpp/plugins/xep_0222.py @@ -23,7 +23,7 @@ class XEP_0222(BasePlugin): name = 'xep_0222' description = 'XEP-0222: Persistent Storage of Public Data via PubSub' - dependencies = set(['xep_0163', 'xep_0060', 'xep_0004']) + dependencies = {'xep_0163', 'xep_0060', 'xep_0004'} profile = {'pubsub#persist_items': True, 'pubsub#send_last_published_item': 'never'} diff --git a/slixmpp/plugins/xep_0223.py b/slixmpp/plugins/xep_0223.py index 2461bb20..03a191da 100644 --- a/slixmpp/plugins/xep_0223.py +++ b/slixmpp/plugins/xep_0223.py @@ -23,7 +23,7 @@ class XEP_0223(BasePlugin): name = 'xep_0223' description = 'XEP-0223: Persistent Storage of Private Data via PubSub' - dependencies = set(['xep_0163', 'xep_0060', 'xep_0004']) + dependencies = {'xep_0163', 'xep_0060', 'xep_0004'} profile = {'pubsub#persist_items': True, 'pubsub#send_last_published_item': 'never'} diff --git a/slixmpp/plugins/xep_0224/attention.py b/slixmpp/plugins/xep_0224/attention.py index 2777e1b0..196d3ed6 100644 --- a/slixmpp/plugins/xep_0224/attention.py +++ b/slixmpp/plugins/xep_0224/attention.py @@ -27,7 +27,7 @@ class XEP_0224(BasePlugin): name = 'xep_0224' description = 'XEP-0224: Attention' - dependencies = set(['xep_0030']) + dependencies = {'xep_0030'} stanza = stanza def plugin_init(self): diff --git a/slixmpp/plugins/xep_0231/bob.py b/slixmpp/plugins/xep_0231/bob.py index a3b5edd4..690d34d4 100644 --- a/slixmpp/plugins/xep_0231/bob.py +++ b/slixmpp/plugins/xep_0231/bob.py @@ -31,7 +31,7 @@ class XEP_0231(BasePlugin): name = 'xep_0231' description = 'XEP-0231: Bits of Binary' - dependencies = set(['xep_0030']) + dependencies = {'xep_0030'} def plugin_init(self): self._cids = {} diff --git a/slixmpp/plugins/xep_0235/oauth.py b/slixmpp/plugins/xep_0235/oauth.py index bcd220b0..4d685cd2 100644 --- a/slixmpp/plugins/xep_0235/oauth.py +++ b/slixmpp/plugins/xep_0235/oauth.py @@ -19,7 +19,7 @@ class XEP_0235(BasePlugin): name = 'xep_0235' description = 'XEP-0235: OAuth Over XMPP' - dependencies = set(['xep_0030']) + dependencies = {'xep_0030'} stanza = stanza def plugin_init(self): diff --git a/slixmpp/plugins/xep_0249/invite.py b/slixmpp/plugins/xep_0249/invite.py index fe5f5884..9f08eae3 100644 --- a/slixmpp/plugins/xep_0249/invite.py +++ b/slixmpp/plugins/xep_0249/invite.py @@ -28,7 +28,7 @@ class XEP_0249(BasePlugin): name = 'xep_0249' description = 'XEP-0249: Direct MUC Invitations' - dependencies = set(['xep_0030']) + dependencies = {'xep_0030'} stanza = stanza def plugin_init(self): diff --git a/slixmpp/plugins/xep_0256.py b/slixmpp/plugins/xep_0256.py index 4ad4f0ea..4efa3518 100644 --- a/slixmpp/plugins/xep_0256.py +++ b/slixmpp/plugins/xep_0256.py @@ -23,7 +23,7 @@ class XEP_0256(BasePlugin): name = 'xep_0256' description = 'XEP-0256: Last Activity in Presence' - dependencies = set(['xep_0012']) + dependencies = {'xep_0012'} stanza = stanza default_config = { 'auto_last_activity': False diff --git a/slixmpp/plugins/xep_0256/last_activity_presence.py b/slixmpp/plugins/xep_0256/last_activity_presence.py index 3766c61e..eb153808 100644 --- a/slixmpp/plugins/xep_0256/last_activity_presence.py +++ b/slixmpp/plugins/xep_0256/last_activity_presence.py @@ -20,7 +20,7 @@ class XEP_0256(BasePlugin): name = 'xep_0256' description = 'XEP-0256: Last Activity in Presence' - dependencies = set(['xep_0030']) + dependencies = {'xep_0030'} stanza = stanza def plugin_init(self): diff --git a/slixmpp/plugins/xep_0257/client_cert_management.py b/slixmpp/plugins/xep_0257/client_cert_management.py index a6d07506..e5a06cf3 100644 --- a/slixmpp/plugins/xep_0257/client_cert_management.py +++ b/slixmpp/plugins/xep_0257/client_cert_management.py @@ -22,7 +22,7 @@ class XEP_0257(BasePlugin): name = 'xep_0257' description = 'XEP-0257: Client Certificate Management for SASL EXTERNAL' - dependencies = set(['xep_0030']) + dependencies = {'xep_0030'} stanza = stanza def plugin_init(self): diff --git a/slixmpp/plugins/xep_0257/stanza.py b/slixmpp/plugins/xep_0257/stanza.py index 86b63451..18d26775 100644 --- a/slixmpp/plugins/xep_0257/stanza.py +++ b/slixmpp/plugins/xep_0257/stanza.py @@ -21,13 +21,13 @@ class CertItem(ElementBase): namespace = 'urn:xmpp:saslcert:1' plugin_attrib = 'item' plugin_multi_attrib = 'items' - interfaces = set(['name', 'x509cert', 'users']) - sub_interfaces = set(['name', 'x509cert']) + interfaces = {'name', 'x509cert', 'users'} + sub_interfaces = {'name', 'x509cert'} def get_users(self): resources = self.xml.findall('{%s}users/{%s}resource' % ( self.namespace, self.namespace)) - return set([res.text for res in resources]) + return {res.text for res in resources} def set_users(self, values): users = self.xml.find('{%s}users' % self.namespace) @@ -49,8 +49,8 @@ class AppendCert(ElementBase): name = 'append' namespace = 'urn:xmpp:saslcert:1' plugin_attrib = 'sasl_cert_append' - interfaces = set(['name', 'x509cert', 'cert_management']) - sub_interfaces = set(['name', 'x509cert']) + interfaces = {'name', 'x509cert', 'cert_management'} + sub_interfaces = {'name', 'x509cert'} def get_cert_management(self): manage = self.xml.find('{%s}no-cert-management' % self.namespace) @@ -72,7 +72,7 @@ class DisableCert(ElementBase): name = 'disable' namespace = 'urn:xmpp:saslcert:1' plugin_attrib = 'sasl_cert_disable' - interfaces = set(['name']) + interfaces = {'name'} sub_interfaces = interfaces @@ -80,7 +80,7 @@ class RevokeCert(ElementBase): name = 'revoke' namespace = 'urn:xmpp:saslcert:1' plugin_attrib = 'sasl_cert_revoke' - interfaces = set(['name']) + interfaces = {'name'} sub_interfaces = interfaces diff --git a/slixmpp/plugins/xep_0258/security_labels.py b/slixmpp/plugins/xep_0258/security_labels.py index 2fb048c7..b4c3a75a 100644 --- a/slixmpp/plugins/xep_0258/security_labels.py +++ b/slixmpp/plugins/xep_0258/security_labels.py @@ -21,7 +21,7 @@ class XEP_0258(BasePlugin): name = 'xep_0258' description = 'XEP-0258: Security Labels in XMPP' - dependencies = set(['xep_0030']) + dependencies = {'xep_0030'} stanza = stanza def plugin_init(self): diff --git a/slixmpp/plugins/xep_0258/stanza.py b/slixmpp/plugins/xep_0258/stanza.py index e47bd34f..bc9718c9 100644 --- a/slixmpp/plugins/xep_0258/stanza.py +++ b/slixmpp/plugins/xep_0258/stanza.py @@ -33,7 +33,7 @@ class DisplayMarking(ElementBase): name = 'displaymarking' namespace = 'urn:xmpp:sec-label:0' plugin_attrib = 'display_marking' - interfaces = set(['fgcolor', 'bgcolor', 'value']) + interfaces = {'fgcolor', 'bgcolor', 'value'} def get_fgcolor(self): return self._get_attr('fgcolor', 'black') @@ -62,7 +62,7 @@ class Catalog(ElementBase): name = 'catalog' namespace = 'urn:xmpp:sec-label:catalog:2' plugin_attrib = 'security_label_catalog' - interfaces = set(['to', 'from', 'name', 'desc', 'id', 'size', 'restrict']) + interfaces = {'to', 'from', 'name', 'desc', 'id', 'size', 'restrict'} def get_to(self): return JID(self._get_attr('to')) @@ -96,7 +96,7 @@ class CatalogItem(ElementBase): namespace = 'urn:xmpp:sec-label:catalog:2' plugin_attrib = 'item' plugin_multi_attrib = 'items' - interfaces = set(['selector', 'default']) + interfaces = {'selector', 'default'} def get_default(self): value = self._get_attr('default', '') @@ -116,7 +116,7 @@ class ESSLabel(ElementBase): name = 'esssecuritylabel' namespace = 'urn:xmpp:sec-label:ess:0' plugin_attrib = 'ess' - interfaces = set(['value']) + interfaces = {'value'} def get_value(self): if self.xml.text: diff --git a/slixmpp/plugins/xep_0279/ipcheck.py b/slixmpp/plugins/xep_0279/ipcheck.py index e8cea46f..56d9afd4 100644 --- a/slixmpp/plugins/xep_0279/ipcheck.py +++ b/slixmpp/plugins/xep_0279/ipcheck.py @@ -19,7 +19,7 @@ class XEP_0279(BasePlugin): name = 'xep_0279' description = 'XEP-0279: Server IP Check' - dependencies = set(['xep_0030']) + dependencies = {'xep_0030'} stanza = stanza def plugin_init(self): diff --git a/slixmpp/plugins/xep_0279/stanza.py b/slixmpp/plugins/xep_0279/stanza.py index f80623cd..d8f5f674 100644 --- a/slixmpp/plugins/xep_0279/stanza.py +++ b/slixmpp/plugins/xep_0279/stanza.py @@ -14,7 +14,7 @@ class IPCheck(ElementBase): name = 'ip' namespace = 'urn:xmpp:sic:0' plugin_attrib = 'ip_check' - interfaces = set(['ip_check']) + interfaces = {'ip_check'} is_extension = True def get_ip_check(self): diff --git a/slixmpp/plugins/xep_0280/carbons.py b/slixmpp/plugins/xep_0280/carbons.py index a64ccbfd..261238b7 100644 --- a/slixmpp/plugins/xep_0280/carbons.py +++ b/slixmpp/plugins/xep_0280/carbons.py @@ -28,7 +28,7 @@ class XEP_0280(BasePlugin): name = 'xep_0280' description = 'XEP-0280: Message Carbons' - dependencies = set(['xep_0030', 'xep_0297']) + dependencies = {'xep_0030', 'xep_0297'} stanza = stanza def plugin_init(self): diff --git a/slixmpp/plugins/xep_0280/stanza.py b/slixmpp/plugins/xep_0280/stanza.py index 46276189..343df12f 100644 --- a/slixmpp/plugins/xep_0280/stanza.py +++ b/slixmpp/plugins/xep_0280/stanza.py @@ -13,7 +13,7 @@ class ReceivedCarbon(ElementBase): name = 'received' namespace = 'urn:xmpp:carbons:2' plugin_attrib = 'carbon_received' - interfaces = set(['carbon_received']) + interfaces = {'carbon_received'} is_extension = True def get_carbon_received(self): @@ -30,7 +30,7 @@ class SentCarbon(ElementBase): name = 'sent' namespace = 'urn:xmpp:carbons:2' plugin_attrib = 'carbon_sent' - interfaces = set(['carbon_sent']) + interfaces = {'carbon_sent'} is_extension = True def get_carbon_sent(self): diff --git a/slixmpp/plugins/xep_0297/forwarded.py b/slixmpp/plugins/xep_0297/forwarded.py index 7c40bf30..a0c36d0c 100644 --- a/slixmpp/plugins/xep_0297/forwarded.py +++ b/slixmpp/plugins/xep_0297/forwarded.py @@ -21,7 +21,7 @@ class XEP_0297(BasePlugin): name = 'xep_0297' description = 'XEP-0297: Stanza Forwarding' - dependencies = set(['xep_0030', 'xep_0203']) + dependencies = {'xep_0030', 'xep_0203'} stanza = stanza def plugin_init(self): diff --git a/slixmpp/plugins/xep_0297/stanza.py b/slixmpp/plugins/xep_0297/stanza.py index 233ad4f6..d211f83c 100644 --- a/slixmpp/plugins/xep_0297/stanza.py +++ b/slixmpp/plugins/xep_0297/stanza.py @@ -14,7 +14,7 @@ class Forwarded(ElementBase): name = 'forwarded' namespace = 'urn:xmpp:forward:0' plugin_attrib = 'forwarded' - interfaces = set(['stanza']) + interfaces = {'stanza'} def get_stanza(self): for stanza in self: diff --git a/slixmpp/plugins/xep_0308/correction.py b/slixmpp/plugins/xep_0308/correction.py index 3802b799..d94f62a4 100644 --- a/slixmpp/plugins/xep_0308/correction.py +++ b/slixmpp/plugins/xep_0308/correction.py @@ -28,7 +28,7 @@ class XEP_0308(BasePlugin): name = 'xep_0308' description = 'XEP-0308: Last Message Correction' - dependencies = set(['xep_0030']) + dependencies = {'xep_0030'} stanza = stanza def plugin_init(self): diff --git a/slixmpp/plugins/xep_0308/stanza.py b/slixmpp/plugins/xep_0308/stanza.py index eb04d1ad..11e0d52b 100644 --- a/slixmpp/plugins/xep_0308/stanza.py +++ b/slixmpp/plugins/xep_0308/stanza.py @@ -13,4 +13,4 @@ class Replace(ElementBase): name = 'replace' namespace = 'urn:xmpp:message-correct:0' plugin_attrib = 'replace' - interfaces = set(['id']) + interfaces = {'id'} diff --git a/slixmpp/plugins/xep_0313/mam.py b/slixmpp/plugins/xep_0313/mam.py index d1c6b983..37aa49b4 100644 --- a/slixmpp/plugins/xep_0313/mam.py +++ b/slixmpp/plugins/xep_0313/mam.py @@ -29,7 +29,7 @@ class XEP_0313(BasePlugin): name = 'xep_0313' description = 'XEP-0313: Message Archive Management' - dependencies = set(['xep_0030', 'xep_0050', 'xep_0059', 'xep_0297']) + dependencies = {'xep_0030', 'xep_0050', 'xep_0059', 'xep_0297'} stanza = stanza def plugin_init(self): diff --git a/slixmpp/plugins/xep_0313/stanza.py b/slixmpp/plugins/xep_0313/stanza.py index d7cfa222..a10ddf9b 100644 --- a/slixmpp/plugins/xep_0313/stanza.py +++ b/slixmpp/plugins/xep_0313/stanza.py @@ -17,8 +17,8 @@ class MAM(ElementBase): name = 'query' namespace = 'urn:xmpp:mam:tmp' plugin_attrib = 'mam' - interfaces = set(['queryid', 'start', 'end', 'with', 'results']) - sub_interfaces = set(['start', 'end', 'with']) + interfaces = {'queryid', 'start', 'end', 'with', 'results'} + sub_interfaces = {'start', 'end', 'with'} def setup(self, xml=None): ElementBase.setup(self, xml) @@ -66,8 +66,8 @@ class Preferences(ElementBase): name = 'prefs' namespace = 'urn:xmpp:mam:tmp' plugin_attrib = 'mam_prefs' - interfaces = set(['default', 'always', 'never']) - sub_interfaces = set(['always', 'never']) + interfaces = {'default', 'always', 'never'} + sub_interfaces = {'always', 'never'} def get_always(self): results = set() @@ -122,7 +122,7 @@ class Result(ElementBase): name = 'result' namespace = 'urn:xmpp:mam:tmp' plugin_attrib = 'mam_result' - interfaces = set(['queryid', 'id']) + interfaces = {'queryid', 'id'} class Archived(ElementBase): @@ -130,7 +130,7 @@ class Archived(ElementBase): namespace = 'urn:xmpp:mam:tmp' plugin_attrib = 'mam_archived' plugin_multi_attrib = 'mam_archives' - interfaces = set(['by', 'id']) + interfaces = {'by', 'id'} def get_by(self): return JID(self._get_attr('by')) diff --git a/slixmpp/plugins/xep_0319/idle.py b/slixmpp/plugins/xep_0319/idle.py index 1fd980a5..65500706 100644 --- a/slixmpp/plugins/xep_0319/idle.py +++ b/slixmpp/plugins/xep_0319/idle.py @@ -19,7 +19,7 @@ from slixmpp.plugins.xep_0319 import stanza class XEP_0319(BasePlugin): name = 'xep_0319' description = 'XEP-0319: Last User Interaction in Presence' - dependencies = set(['xep_0012']) + dependencies = {'xep_0012'} stanza = stanza def plugin_init(self): diff --git a/slixmpp/plugins/xep_0319/stanza.py b/slixmpp/plugins/xep_0319/stanza.py index ea70087b..3fdcd502 100644 --- a/slixmpp/plugins/xep_0319/stanza.py +++ b/slixmpp/plugins/xep_0319/stanza.py @@ -16,7 +16,7 @@ class Idle(ElementBase): name = 'idle' namespace = 'urn:xmpp:idle:1' plugin_attrib = 'idle' - interfaces = set(['since']) + interfaces = {'since'} def get_since(self): timestamp = self._get_attr('since') diff --git a/slixmpp/plugins/xep_0323/sensordata.py b/slixmpp/plugins/xep_0323/sensordata.py index c88deee9..fa340aae 100644 --- a/slixmpp/plugins/xep_0323/sensordata.py +++ b/slixmpp/plugins/xep_0323/sensordata.py @@ -101,7 +101,7 @@ class XEP_0323(BasePlugin): name = 'xep_0323' description = 'XEP-0323 Internet of Things - Sensor Data' - dependencies = set(['xep_0030']) + dependencies = {'xep_0030'} stanza = stanza diff --git a/slixmpp/plugins/xep_0323/stanza/sensordata.py b/slixmpp/plugins/xep_0323/stanza/sensordata.py index aa223a62..79094e4c 100644 --- a/slixmpp/plugins/xep_0323/stanza/sensordata.py +++ b/slixmpp/plugins/xep_0323/stanza/sensordata.py @@ -37,9 +37,9 @@ class Request(ElementBase): namespace = 'urn:xmpp:iot:sensordata' name = 'req' plugin_attrib = name - interfaces = set(['seqnr','nodes','fields','serviceToken','deviceToken','userToken','from','to','when','historical','all']) + interfaces = {'seqnr','nodes','fields','serviceToken','deviceToken','userToken','from','to','when','historical','all'} interfaces.update(FieldTypes.field_types) - _flags = set(['serviceToken','deviceToken','userToken','from','to','when','historical','all']) + _flags = {'serviceToken','deviceToken','userToken','from','to','when','historical','all'} _flags.update(FieldTypes.field_types) def __init__(self, xml=None, parent=None): @@ -59,8 +59,8 @@ class Request(ElementBase): xml -- Use an existing XML object for the stanza's values. """ ElementBase.setup(self, xml) - self._nodes = set([node['nodeId'] for node in self['nodes']]) - self._fields = set([field['name'] for field in self['fields']]) + self._nodes = {node['nodeId'] for node in self['nodes']} + self._fields = {field['name'] for field in self['fields']} def _get_flags(self): """ @@ -225,39 +225,39 @@ class RequestNode(ElementBase): namespace = 'urn:xmpp:iot:sensordata' name = 'node' plugin_attrib = name - interfaces = set(['nodeId','sourceId','cacheType']) + interfaces = {'nodeId','sourceId','cacheType'} class RequestField(ElementBase): """ Field element in a request """ namespace = 'urn:xmpp:iot:sensordata' name = 'field' plugin_attrib = name - interfaces = set(['name']) + interfaces = {'name'} class Accepted(ElementBase): namespace = 'urn:xmpp:iot:sensordata' name = 'accepted' plugin_attrib = name - interfaces = set(['seqnr','queued']) + interfaces = {'seqnr','queued'} class Started(ElementBase): namespace = 'urn:xmpp:iot:sensordata' name = 'started' plugin_attrib = name - interfaces = set(['seqnr']) + interfaces = {'seqnr'} class Failure(ElementBase): namespace = 'urn:xmpp:iot:sensordata' name = 'failure' plugin_attrib = name - interfaces = set(['seqnr','done']) + interfaces = {'seqnr','done'} class Error(ElementBase): """ Error element in a request failure """ namespace = 'urn:xmpp:iot:sensordata' name = 'error' plugin_attrib = name - interfaces = set(['nodeId','timestamp','sourceId','cacheType','text']) + interfaces = {'nodeId','timestamp','sourceId','cacheType','text'} def get_text(self): """Return then contents inside the XML tag.""" @@ -281,15 +281,15 @@ class Rejected(ElementBase): namespace = 'urn:xmpp:iot:sensordata' name = 'rejected' plugin_attrib = name - interfaces = set(['seqnr','error']) - sub_interfaces = set(['error']) + interfaces = {'seqnr','error'} + sub_interfaces = {'error'} class Fields(ElementBase): """ Fields element, top level in a response message with data """ namespace = 'urn:xmpp:iot:sensordata' name = 'fields' plugin_attrib = name - interfaces = set(['seqnr','done','nodes']) + interfaces = {'seqnr','done','nodes'} def __init__(self, xml=None, parent=None): ElementBase.__init__(self, xml, parent) @@ -307,7 +307,7 @@ class Fields(ElementBase): xml -- Use an existing XML object for the stanza's values. """ ElementBase.setup(self, xml) - self._nodes = set([node['nodeId'] for node in self['nodes']]) + self._nodes = {node['nodeId'] for node in self['nodes']} def add_node(self, nodeId, sourceId=None, cacheType=None, substanzas=None): @@ -389,7 +389,7 @@ class FieldsNode(ElementBase): namespace = 'urn:xmpp:iot:sensordata' name = 'node' plugin_attrib = name - interfaces = set(['nodeId','sourceId','cacheType','timestamps']) + interfaces = {'nodeId','sourceId','cacheType','timestamps'} def __init__(self, xml=None, parent=None): ElementBase.__init__(self, xml, parent) @@ -407,7 +407,7 @@ class FieldsNode(ElementBase): xml -- Use an existing XML object for the stanza's values. """ ElementBase.setup(self, xml) - self._timestamps = set([ts['value'] for ts in self['timestamps']]) + self._timestamps = {ts['value'] for ts in self['timestamps']} def add_timestamp(self, timestamp, substanzas=None): """ @@ -498,7 +498,7 @@ class Field(ElementBase): namespace = 'urn:xmpp:iot:sensordata' name = 'field' plugin_attrib = name - interfaces = set(['name','module','stringIds']) + interfaces = {'name','module','stringIds'} interfaces.update(FieldTypes.field_types) interfaces.update(FieldStatus.field_status) @@ -554,7 +554,7 @@ class Timestamp(ElementBase): namespace = 'urn:xmpp:iot:sensordata' name = 'timestamp' plugin_attrib = name - interfaces = set(['value','datas']) + interfaces = {'value','datas'} def __init__(self, xml=None, parent=None): ElementBase.__init__(self, xml, parent) @@ -572,7 +572,7 @@ class Timestamp(ElementBase): xml -- Use an existing XML object for the stanza's values. """ ElementBase.setup(self, xml) - self._datas = set([data['name'] for data in self['datas']]) + self._datas = {data['name'] for data in self['datas']} def add_data(self, typename, name, value, module=None, stringIds=None, unit=None, dataType=None, flags=None): """ @@ -668,7 +668,7 @@ class DataNumeric(Field): namespace = 'urn:xmpp:iot:sensordata' name = 'numeric' plugin_attrib = name - interfaces = set(['value', 'unit']) + interfaces = {'value', 'unit'} interfaces.update(Field.interfaces) def _get_typename(self): @@ -681,7 +681,7 @@ class DataString(Field): namespace = 'urn:xmpp:iot:sensordata' name = 'string' plugin_attrib = name - interfaces = set(['value']) + interfaces = {'value'} interfaces.update(Field.interfaces) def _get_typename(self): @@ -695,7 +695,7 @@ class DataBoolean(Field): namespace = 'urn:xmpp:iot:sensordata' name = 'boolean' plugin_attrib = name - interfaces = set(['value']) + interfaces = {'value'} interfaces.update(Field.interfaces) def _get_typename(self): @@ -709,7 +709,7 @@ class DataDateTime(Field): namespace = 'urn:xmpp:iot:sensordata' name = 'dateTime' plugin_attrib = name - interfaces = set(['value']) + interfaces = {'value'} interfaces.update(Field.interfaces) def _get_typename(self): @@ -723,7 +723,7 @@ class DataTimeSpan(Field): namespace = 'urn:xmpp:iot:sensordata' name = 'timeSpan' plugin_attrib = name - interfaces = set(['value']) + interfaces = {'value'} interfaces.update(Field.interfaces) def _get_typename(self): @@ -737,7 +737,7 @@ class DataEnum(Field): namespace = 'urn:xmpp:iot:sensordata' name = 'enum' plugin_attrib = name - interfaces = set(['value', 'dataType']) + interfaces = {'value', 'dataType'} interfaces.update(Field.interfaces) def _get_typename(self): @@ -748,21 +748,21 @@ class Done(ElementBase): namespace = 'urn:xmpp:iot:sensordata' name = 'done' plugin_attrib = name - interfaces = set(['seqnr']) + interfaces = {'seqnr'} class Cancel(ElementBase): """ Cancel element used to signal that a request shall be cancelled """ namespace = 'urn:xmpp:iot:sensordata' name = 'cancel' plugin_attrib = name - interfaces = set(['seqnr']) + interfaces = {'seqnr'} class Cancelled(ElementBase): """ Cancelled element used to signal that cancellation is confirmed """ namespace = 'urn:xmpp:iot:sensordata' name = 'cancelled' plugin_attrib = name - interfaces = set(['seqnr']) + interfaces = {'seqnr'} register_stanza_plugin(Iq, Request) diff --git a/slixmpp/plugins/xep_0325/control.py b/slixmpp/plugins/xep_0325/control.py index 5c1b3003..5960291c 100644 --- a/slixmpp/plugins/xep_0325/control.py +++ b/slixmpp/plugins/xep_0325/control.py @@ -97,7 +97,7 @@ class XEP_0325(BasePlugin): name = 'xep_0325' description = 'XEP-0325 Internet of Things - Control' - dependencies = set(['xep_0030']) + dependencies = {'xep_0030'} stanza = stanza diff --git a/slixmpp/plugins/xep_0325/stanza/control.py b/slixmpp/plugins/xep_0325/stanza/control.py index c47f3a4e..3662ff0c 100644 --- a/slixmpp/plugins/xep_0325/stanza/control.py +++ b/slixmpp/plugins/xep_0325/stanza/control.py @@ -23,7 +23,7 @@ class ControlSet(ElementBase): namespace = 'urn:xmpp:iot:control' name = 'set' plugin_attrib = name - interfaces = set(['nodes','datas']) + interfaces = {'nodes','datas'} def __init__(self, xml=None, parent=None): ElementBase.__init__(self, xml, parent) @@ -42,8 +42,8 @@ class ControlSet(ElementBase): xml -- Use an existing XML object for the stanza's values. """ ElementBase.setup(self, xml) - self._nodes = set([node['nodeId'] for node in self['nodes']]) - self._datas = set([data['name'] for data in self['datas']]) + self._nodes = {node['nodeId'] for node in self['nodes']} + self._datas = {data['name'] for data in self['datas']} def add_node(self, nodeId, sourceId=None, cacheType=None): """ @@ -207,14 +207,14 @@ class RequestNode(ElementBase): namespace = 'urn:xmpp:iot:control' name = 'node' plugin_attrib = name - interfaces = set(['nodeId','sourceId','cacheType']) + interfaces = {'nodeId','sourceId','cacheType'} class ControlSetResponse(ElementBase): namespace = 'urn:xmpp:iot:control' name = 'setResponse' plugin_attrib = name - interfaces = set(['responseCode']) + interfaces = {'responseCode'} def __init__(self, xml=None, parent=None): ElementBase.__init__(self, xml, parent) @@ -233,8 +233,8 @@ class ControlSetResponse(ElementBase): xml -- Use an existing XML object for the stanza's values. """ ElementBase.setup(self, xml) - self._nodes = set([node['nodeId'] for node in self['nodes']]) - self._datas = set([data['name'] for data in self['datas']]) + self._nodes = {node['nodeId'] for node in self['nodes']} + self._datas = {data['name'] for data in self['datas']} def add_node(self, nodeId, sourceId=None, cacheType=None): """ @@ -370,7 +370,7 @@ class Error(ElementBase): namespace = 'urn:xmpp:iot:control' name = 'error' plugin_attrib = name - interfaces = set(['var','text']) + interfaces = {'var','text'} def get_text(self): """Return then contents inside the XML tag.""" @@ -398,7 +398,7 @@ class ResponseParameter(ElementBase): namespace = 'urn:xmpp:iot:control' name = 'parameter' plugin_attrib = name - interfaces = set(['name']) + interfaces = {'name'} class BaseParameter(ElementBase): @@ -419,7 +419,7 @@ class BaseParameter(ElementBase): namespace = 'urn:xmpp:iot:control' name = 'baseParameter' plugin_attrib = name - interfaces = set(['name','value']) + interfaces = {'name','value'} def _get_typename(self): return self.name diff --git a/slixmpp/plugins/xep_0332/http.py b/slixmpp/plugins/xep_0332/http.py index 7ad14dc8..cb443bc0 100644 --- a/slixmpp/plugins/xep_0332/http.py +++ b/slixmpp/plugins/xep_0332/http.py @@ -36,7 +36,7 @@ class XEP_0332(BasePlugin): #: xep_0047 not included. #: xep_0001, 0137 and 0166 are missing - dependencies = set(['xep_0030', 'xep_0131']) + dependencies = {'xep_0030', 'xep_0131'} #: TODO: Do we really need to mention the supported_headers?! default_config = { diff --git a/slixmpp/plugins/xep_0332/stanza/data.py b/slixmpp/plugins/xep_0332/stanza/data.py index a19c94f5..92e3d3af 100644 --- a/slixmpp/plugins/xep_0332/stanza/data.py +++ b/slixmpp/plugins/xep_0332/stanza/data.py @@ -17,7 +17,7 @@ class HTTPData(ElementBase): """ name = 'data' namespace = 'urn:xmpp:http' - interfaces = set(['data']) + interfaces = {'data'} plugin_attrib = 'data' is_extension = True diff --git a/slixmpp/plugins/xep_0332/stanza/request.py b/slixmpp/plugins/xep_0332/stanza/request.py index e3e46361..1d4aa5b1 100644 --- a/slixmpp/plugins/xep_0332/stanza/request.py +++ b/slixmpp/plugins/xep_0332/stanza/request.py @@ -49,7 +49,7 @@ class HTTPRequest(ElementBase): name = 'request' namespace = 'urn:xmpp:http' - interfaces = set(['method', 'resource', 'version']) + interfaces = {'method', 'resource', 'version'} plugin_attrib = 'http-req' def get_method(self): diff --git a/slixmpp/plugins/xep_0332/stanza/response.py b/slixmpp/plugins/xep_0332/stanza/response.py index a0b8fe34..8f58f0c2 100644 --- a/slixmpp/plugins/xep_0332/stanza/response.py +++ b/slixmpp/plugins/xep_0332/stanza/response.py @@ -46,7 +46,7 @@ class HTTPResponse(ElementBase): name = 'response' namespace = 'urn:xmpp:http' - interfaces = set(['code', 'message', 'version']) + interfaces = {'code', 'message', 'version'} plugin_attrib = 'http-resp' def get_code(self): diff --git a/slixmpp/stanza/message.py b/slixmpp/stanza/message.py index cbb170fa..b9f93b29 100644 --- a/slixmpp/stanza/message.py +++ b/slixmpp/stanza/message.py @@ -49,9 +49,9 @@ class Message(RootStanza): plugin_attrib = name interfaces = set(['type', 'to', 'from', 'id', 'body', 'subject', 'thread', 'parent_thread', 'mucroom', 'mucnick']) - sub_interfaces = set(['body', 'subject', 'thread']) + sub_interfaces = {'body', 'subject', 'thread'} lang_interfaces = sub_interfaces - types = set(['normal', 'chat', 'headline', 'error', 'groupchat']) + types = {'normal', 'chat', 'headline', 'error', 'groupchat'} def __init__(self, *args, **kwargs): """ diff --git a/slixmpp/stanza/presence.py b/slixmpp/stanza/presence.py index 517e73c1..94382bce 100644 --- a/slixmpp/stanza/presence.py +++ b/slixmpp/stanza/presence.py @@ -58,12 +58,12 @@ class Presence(RootStanza): plugin_attrib = name interfaces = set(['type', 'to', 'from', 'id', 'show', 'status', 'priority']) - sub_interfaces = set(['show', 'status', 'priority']) - lang_interfaces = set(['status']) + sub_interfaces = {'show', 'status', 'priority'} + lang_interfaces = {'status'} types = set(['available', 'unavailable', 'error', 'probe', 'subscribe', 'subscribed', 'unsubscribe', 'unsubscribed']) - showtypes = set(['dnd', 'chat', 'xa', 'away']) + showtypes = {'dnd', 'chat', 'xa', 'away'} def __init__(self, *args, **kwargs): """ diff --git a/slixmpp/util/sasl/mechanisms.py b/slixmpp/util/sasl/mechanisms.py index de0203c0..b74d09c9 100644 --- a/slixmpp/util/sasl/mechanisms.py +++ b/slixmpp/util/sasl/mechanisms.py @@ -39,7 +39,7 @@ class ANONYMOUS(Mech): class LOGIN(Mech): name = 'LOGIN' - required_credentials = set(['username', 'password']) + required_credentials = {'username', 'password'} def setup(self, name): self.step = 0 @@ -59,9 +59,9 @@ class LOGIN(Mech): class PLAIN(Mech): name = 'PLAIN' - required_credentials = set(['username', 'password']) - optional_credentials = set(['authzid']) - security = set(['encrypted', 'encrypted_plain', 'unencrypted_plain']) + required_credentials = {'username', 'password'} + optional_credentials = {'authzid'} + security = {'encrypted', 'encrypted_plain', 'unencrypted_plain'} def setup(self, name): if not self.security_settings['encrypted']: @@ -82,7 +82,7 @@ class PLAIN(Mech): class EXTERNAL(Mech): name = 'EXTERNAL' - optional_credentials = set(['authzid']) + optional_credentials = {'authzid'} def process(self, challenge=b''): return self.credentials['authzid'] @@ -92,7 +92,7 @@ class EXTERNAL(Mech): class X_FACEBOOK_PLATFORM(Mech): name = 'X-FACEBOOK-PLATFORM' - required_credentials = set(['api_key', 'access_token']) + required_credentials = {'api_key', 'access_token'} def process(self, challenge=b''): if challenge: @@ -119,7 +119,7 @@ class X_FACEBOOK_PLATFORM(Mech): class X_MESSENGER_OAUTH2(Mech): name = 'X-MESSENGER-OAUTH2' - required_credentials = set(['access_token']) + required_credentials = {'access_token'} def process(self, challenge=b''): return self.credentials['access_token'] @@ -129,7 +129,7 @@ class X_MESSENGER_OAUTH2(Mech): class X_OAUTH2(Mech): name = 'X-OAUTH2' - required_credentials = set(['username', 'access_token']) + required_credentials = {'username', 'access_token'} def process(self, challenge=b''): return b'\x00' + self.credentials['username'] + \ @@ -140,7 +140,7 @@ class X_OAUTH2(Mech): class X_GOOGLE_TOKEN(Mech): name = 'X-GOOGLE-TOKEN' - required_credentials = set(['email', 'access_token']) + required_credentials = {'email', 'access_token'} def process(self, challenge=b''): email = self.credentials['email'] @@ -153,8 +153,8 @@ class CRAM(Mech): name = 'CRAM' use_hashes = True - required_credentials = set(['username', 'password']) - security = set(['encrypted', 'unencrypted_cram']) + required_credentials = {'username', 'password'} + security = {'encrypted', 'unencrypted_cram'} def setup(self, name): self.hash_name = name[5:] @@ -184,9 +184,9 @@ class SCRAM(Mech): name = 'SCRAM' use_hashes = True channel_binding = True - required_credentials = set(['username', 'password']) - optional_credentials = set(['authzid', 'channel_binding']) - security = set(['encrypted', 'unencrypted_scram']) + required_credentials = {'username', 'password'} + optional_credentials = {'authzid', 'channel_binding'} + security = {'encrypted', 'unencrypted_scram'} def setup(self, name): self.use_channel_binding = False @@ -334,9 +334,9 @@ class DIGEST(Mech): name = 'DIGEST' use_hashes = True - required_credentials = set(['username', 'password', 'realm', 'service', 'host']) - optional_credentials = set(['authzid', 'service-name']) - security = set(['encrypted', 'unencrypted_digest']) + required_credentials = {'username', 'password', 'realm', 'service', 'host'} + optional_credentials = {'authzid', 'service-name'} + security = {'encrypted', 'unencrypted_digest'} def setup(self, name): self.hash_name = name[7:] @@ -511,8 +511,8 @@ else: class GSSAPI(Mech): name = 'GSSAPI' - required_credentials = set(['username', 'service-name']) - optional_credentials = set(['authzid']) + required_credentials = {'username', 'service-name'} + optional_credentials = {'authzid'} def setup(self, name): authzid = self.credentials['authzid'] diff --git a/slixmpp/xmlstream/stanzabase.py b/slixmpp/xmlstream/stanzabase.py index 1108adfb..605dbb61 100644 --- a/slixmpp/xmlstream/stanzabase.py +++ b/slixmpp/xmlstream/stanzabase.py @@ -147,8 +147,8 @@ def multifactory(stanza, plugin_attrib): Multi.is_extension = True Multi.plugin_attrib = plugin_attrib Multi._multistanza = stanza - Multi.interfaces = set([plugin_attrib]) - Multi.lang_interfaces = set([plugin_attrib]) + Multi.interfaces = {plugin_attrib} + Multi.lang_interfaces = {plugin_attrib} setattr(Multi, "get_%s" % plugin_attrib, get_multi) setattr(Multi, "set_%s" % plugin_attrib, set_multi) setattr(Multi, "del_%s" % plugin_attrib, del_multi) diff --git a/tests/test_plugins.py b/tests/test_plugins.py index ee6d44c0..a8cc2744 100644 --- a/tests/test_plugins.py +++ b/tests/test_plugins.py @@ -14,21 +14,21 @@ class B(BasePlugin): class C(BasePlugin): name = 'c' - dependencies = set(['b', 'd']) + dependencies = {'b', 'd'} class D(BasePlugin): name = 'd' - dependencies = set(['c']) + dependencies = {'c'} class E(BasePlugin): name = 'e' - dependencies = set(['a', 'd']) + dependencies = {'a', 'd'} class F(BasePlugin): name = 'f' - dependencies = set(['a', 'b']) + dependencies = {'a', 'b'} register_plugin(A) diff --git a/tests/test_stanza_element.py b/tests/test_stanza_element.py index 26cc2438..678a49fd 100644 --- a/tests/test_stanza_element.py +++ b/tests/test_stanza_element.py @@ -754,7 +754,7 @@ class TestElementBase(SlixTest): class TestStanza(ElementBase): name = "foo" namespace = "foo" - interfaces = set(['bar']) + interfaces = {'bar'} bool_interfaces = interfaces stanza = TestStanza() @@ -946,7 +946,7 @@ class TestElementBase(SlixTest): class TestStanza(ElementBase): name = 'foo' namespace = 'test' - interfaces = set(['test']) + interfaces = {'test'} sub_interfaces = interfaces lang_interfaces = interfaces @@ -972,7 +972,7 @@ class TestElementBase(SlixTest): class TestStanza(ElementBase): name = 'foo' namespace = 'test' - interfaces = set(['test']) + interfaces = {'test'} sub_interfaces = interfaces lang_interfaces = interfaces @@ -1008,7 +1008,7 @@ class TestElementBase(SlixTest): class TestStanza(ElementBase): name = 'foo' namespace = 'test' - interfaces = set(['test']) + interfaces = {'test'} sub_interfaces = interfaces lang_interfaces = interfaces @@ -1040,7 +1040,7 @@ class TestElementBase(SlixTest): class TestStanza(ElementBase): name = 'foo' namespace = 'test' - interfaces = set(['test']) + interfaces = {'test'} sub_interfaces = interfaces lang_interfaces = interfaces @@ -1096,7 +1096,7 @@ class TestElementBase(SlixTest): class TestStanza(ElementBase): name = 'foo' namespace = 'test' - interfaces = set(['test']) + interfaces = {'test'} sub_interfaces = interfaces lang_interfaces = interfaces @@ -1136,7 +1136,7 @@ class TestElementBase(SlixTest): class TestStanza(ElementBase): name = 'foo' namespace = 'test' - interfaces = set(['test']) + interfaces = {'test'} sub_interfaces = interfaces lang_interfaces = interfaces @@ -1177,7 +1177,7 @@ class TestElementBase(SlixTest): class TestStanza(ElementBase): name = 'foo' namespace = 'test' - interfaces = set(['test']) + interfaces = {'test'} sub_interfaces = interfaces lang_interfaces = interfaces @@ -1217,7 +1217,7 @@ class TestElementBase(SlixTest): class TestStanza(ElementBase): name = 'foo' namespace = 'test' - interfaces = set(['test']) + interfaces = {'test'} sub_interfaces = interfaces lang_interfaces = interfaces diff --git a/tests/test_stanza_xep_0030.py b/tests/test_stanza_xep_0030.py index d8e99ffb..71dc7032 100644 --- a/tests/test_stanza_xep_0030.py +++ b/tests/test_stanza_xep_0030.py @@ -274,7 +274,7 @@ class TestDisco(SlixTest): iq['disco_info'].add_identity('client', 'pc', lang='en') iq['disco_info'].add_identity('client', 'pc', lang='fr') - expected = set([('client', 'pc', 'no', None)]) + expected = {('client', 'pc', 'no', None)} result = iq['disco_info'].get_identities(lang='no') self.failUnless(result == expected, "Identities do not match:\n%s\n%s" % ( @@ -336,7 +336,7 @@ class TestDisco(SlixTest): iq['disco_info'].add_feature('bar') iq['disco_info'].add_feature('baz') - expected = set(['foo', 'bar', 'baz']) + expected = {'foo', 'bar', 'baz'} self.failUnless(iq['disco_info']['features'] == expected, "Features do not match:\n%s\n%s" % ( expected, diff --git a/tests/test_stanza_xep_0050.py b/tests/test_stanza_xep_0050.py index 7272d783..0898b136 100644 --- a/tests/test_stanza_xep_0050.py +++ b/tests/test_stanza_xep_0050.py @@ -51,7 +51,7 @@ class TestAdHocCommandStanzas(SlixTest): iq['command']['actions'] = ['prev', 'next'] results = iq['command']['actions'] - expected = set(['prev', 'next']) + expected = {'prev', 'next'} self.assertEqual(results, expected, "Incorrect next actions: %s" % results) diff --git a/tests/test_stream_xep_0050.py b/tests/test_stream_xep_0050.py index 65b5f678..d1a94ecc 100644 --- a/tests/test_stream_xep_0050.py +++ b/tests/test_stream_xep_0050.py @@ -25,7 +25,7 @@ class TestAdHocCommands(SlixTest): class TestPayload(ElementBase): name = 'foo' namespace = 'test' - interfaces = set(['bar']) + interfaces = {'bar'} plugin_attrib = name Command = self.xmpp['xep_0050'].stanza.Command |