aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authormathieui2016-09-30 19:25:36 (GMT)
committermathieui2016-09-30 19:25:36 (GMT)
commit46a90749f839c3d64aa05458cef825f56e9c702d (patch)
tree207a8e9228f6b6b7efde2cef405bf712a505860e
parent0c63a4bbdafcb557430e02f774dc88c5f2a974c1 (diff)
downloadslixmpp-46a90749f839c3d64aa05458cef825f56e9c702d.tar.gz
slixmpp-46a90749f839c3d64aa05458cef825f56e9c702d.tar.xz
Fix #3165, we don’t need to use the long form to get the superobject in our supported python versions.
-rw-r--r--docs/getting_started/echobot.rst6
-rw-r--r--docs/getting_started/sendlogout.rst2
-rwxr-xr-xexamples/pubsub_client.py2
-rwxr-xr-xexamples/pubsub_events.py2
-rwxr-xr-xexamples/user_location.py2
-rwxr-xr-xexamples/user_tune.py2
-rw-r--r--slixmpp/exceptions.py4
-rw-r--r--slixmpp/plugins/base.py2
-rw-r--r--slixmpp/plugins/xep_0054/stanza.py2
9 files changed, 12 insertions, 12 deletions
diff --git a/docs/getting_started/echobot.rst b/docs/getting_started/echobot.rst
index 0137985..63915ca 100644
--- a/docs/getting_started/echobot.rst
+++ b/docs/getting_started/echobot.rst
@@ -70,7 +70,7 @@ as well.
class EchoBot(slixmpp.ClientXMPP):
def __init__(self, jid, password):
- super(EchoBot, self).__init__(jid, password)
+ super().__init__(jid, password)
Handling Session Start
~~~~~~~~~~~~~~~~~~~~~~
@@ -83,7 +83,7 @@ started. To do that, we will register an event handler for the :term:`session_st
.. code-block:: python
def __init__(self, jid, password):
- super(EchoBot, self).__init__(jid, password)
+ super().__init__(jid, password)
self.add_event_handler('session_start', self.start)
@@ -153,7 +153,7 @@ whenever a messsage is received.
.. code-block:: python
def __init__(self, jid, password):
- super(EchoBot, self).__init__(jid, password)
+ super().__init__(jid, password)
self.add_event_handler('session_start', self.start)
self.add_event_handler('message', self.message)
diff --git a/docs/getting_started/sendlogout.rst b/docs/getting_started/sendlogout.rst
index d5882c4..a27976c 100644
--- a/docs/getting_started/sendlogout.rst
+++ b/docs/getting_started/sendlogout.rst
@@ -24,7 +24,7 @@ for the JID that will receive our message, and the string content of the message
class SendMsgBot(slixmpp.ClientXMPP):
def __init__(self, jid, password, recipient, msg):
- super(SendMsgBot, self).__init__(jid, password)
+ super().__init__(jid, password)
self.recipient = recipient
self.msg = msg
diff --git a/examples/pubsub_client.py b/examples/pubsub_client.py
index c568875..d973303 100755
--- a/examples/pubsub_client.py
+++ b/examples/pubsub_client.py
@@ -15,7 +15,7 @@ class PubsubClient(slixmpp.ClientXMPP):
def __init__(self, jid, password, server,
node=None, action='nodes', data=''):
- super(PubsubClient, self).__init__(jid, password)
+ super().__init__(jid, password)
self.register_plugin('xep_0030')
self.register_plugin('xep_0059')
diff --git a/examples/pubsub_events.py b/examples/pubsub_events.py
index 369d711..e2fdc9c 100755
--- a/examples/pubsub_events.py
+++ b/examples/pubsub_events.py
@@ -14,7 +14,7 @@ from slixmpp.xmlstream.handler import Callback
class PubsubEvents(slixmpp.ClientXMPP):
def __init__(self, jid, password):
- super(PubsubEvents, self).__init__(jid, password)
+ super().__init__(jid, password)
self.register_plugin('xep_0030')
self.register_plugin('xep_0059')
diff --git a/examples/user_location.py b/examples/user_location.py
index 5a30f7a..7edbeab 100755
--- a/examples/user_location.py
+++ b/examples/user_location.py
@@ -22,7 +22,7 @@ from slixmpp import ClientXMPP
class LocationBot(ClientXMPP):
def __init__(self, jid, password):
- super(LocationBot, self).__init__(jid, password)
+ super().__init__(jid, password)
self.add_event_handler('session_start', self.start)
self.add_event_handler('user_location_publish',
diff --git a/examples/user_tune.py b/examples/user_tune.py
index 3f5e1c9..6aa0da8 100755
--- a/examples/user_tune.py
+++ b/examples/user_tune.py
@@ -17,7 +17,7 @@ from slixmpp import ClientXMPP
class TuneBot(ClientXMPP):
def __init__(self, jid, password):
- super(TuneBot, self).__init__(jid, password)
+ super().__init__(jid, password)
# Check for the current song every 5 seconds.
self.schedule('Check Current Tune', 5, self._update_tune, repeat=True)
diff --git a/slixmpp/exceptions.py b/slixmpp/exceptions.py
index a6c09a0..0486666 100644
--- a/slixmpp/exceptions.py
+++ b/slixmpp/exceptions.py
@@ -77,7 +77,7 @@ class IqTimeout(XMPPError):
"""
def __init__(self, iq):
- super(IqTimeout, self).__init__(
+ super().__init__(
condition='remote-server-timeout',
etype='cancel')
@@ -94,7 +94,7 @@ class IqError(XMPPError):
"""
def __init__(self, iq):
- super(IqError, self).__init__(
+ super().__init__(
condition=iq['error']['condition'],
text=iq['error']['text'],
etype=iq['error']['type'])
diff --git a/slixmpp/plugins/base.py b/slixmpp/plugins/base.py
index 0fe083b..3196e0e 100644
--- a/slixmpp/plugins/base.py
+++ b/slixmpp/plugins/base.py
@@ -308,7 +308,7 @@ class BasePlugin(object):
if key in self.default_config:
self.config[key] = value
else:
- super(BasePlugin, self).__setattr__(key, value)
+ super().__setattr__(key, value)
def _init(self):
"""Initialize plugin state, such as registering event handlers.
diff --git a/slixmpp/plugins/xep_0054/stanza.py b/slixmpp/plugins/xep_0054/stanza.py
index 48a4143..e764718 100644
--- a/slixmpp/plugins/xep_0054/stanza.py
+++ b/slixmpp/plugins/xep_0054/stanza.py
@@ -127,7 +127,7 @@ class Telephone(ElementBase):
'ISDN', 'PCS', 'PREF'])
def setup(self, xml=None):
- super(Telephone, self).setup(xml=xml)
+ super().setup(xml=xml)
## this blanks out numbers received from server
##self._set_sub_text('NUMBER', '', keep=True)