mirror of
https://github.com/zulip/zulip.git
synced 2025-11-11 01:16:19 +00:00
refactor: Replace super(.*self) with Python 3-specific super().
We change all the instances except for the `test_helpers.py` TimeTrackingCursor monkey-patching, which actually needs to specify the base class.
This commit is contained in:
@@ -177,7 +177,7 @@ class ExceptionFreeTornadoConnection(pika.adapters.TornadoConnection):
|
||||
def _adapter_disconnect(self):
|
||||
# type: () -> None
|
||||
try:
|
||||
super(ExceptionFreeTornadoConnection, self)._adapter_disconnect()
|
||||
super()._adapter_disconnect()
|
||||
except (pika.exceptions.ProbableAuthenticationError,
|
||||
pika.exceptions.ProbableAccessDeniedError,
|
||||
pika.exceptions.IncompatibleProtocolError) as e:
|
||||
@@ -190,7 +190,7 @@ class TornadoQueueClient(SimpleQueueClient):
|
||||
# https://pika.readthedocs.io/en/0.9.8/examples/asynchronous_consumer_example.html
|
||||
def __init__(self):
|
||||
# type: () -> None
|
||||
super(TornadoQueueClient, self).__init__()
|
||||
super().__init__()
|
||||
# Enable rabbitmq heartbeat since TornadoConection can process them
|
||||
self.rabbitmq_heartbeat = None
|
||||
self._on_open_cbs = [] # type: List[Callable[[], None]]
|
||||
|
||||
Reference in New Issue
Block a user