mirror of
https://git.anonymousland.org/anonymousland/synapse.git
synced 2025-12-15 19:18:46 -05:00
Simplify super() calls to Python 3 syntax. (#8344)
This converts calls like super(Foo, self) -> super().
Generated with:
sed -i "" -Ee 's/super\([^\(]+\)/super()/g' **/*.py
This commit is contained in:
parent
68c7a6936f
commit
8a4a4186de
133 changed files with 272 additions and 281 deletions
|
|
@ -79,7 +79,7 @@ class InvalidResponseError(RuntimeError):
|
|||
|
||||
class FederationClient(FederationBase):
|
||||
def __init__(self, hs):
|
||||
super(FederationClient, self).__init__(hs)
|
||||
super().__init__(hs)
|
||||
|
||||
self.pdu_destination_tried = {}
|
||||
self._clock.looping_call(self._clear_tried_cache, 60 * 1000)
|
||||
|
|
|
|||
|
|
@ -90,7 +90,7 @@ pdu_process_time = Histogram(
|
|||
|
||||
class FederationServer(FederationBase):
|
||||
def __init__(self, hs):
|
||||
super(FederationServer, self).__init__(hs)
|
||||
super().__init__(hs)
|
||||
|
||||
self.auth = hs.get_auth()
|
||||
self.handler = hs.get_handlers().federation_handler
|
||||
|
|
|
|||
|
|
@ -68,7 +68,7 @@ class TransportLayerServer(JsonResource):
|
|||
self.clock = hs.get_clock()
|
||||
self.servlet_groups = servlet_groups
|
||||
|
||||
super(TransportLayerServer, self).__init__(hs, canonical_json=False)
|
||||
super().__init__(hs, canonical_json=False)
|
||||
|
||||
self.authenticator = Authenticator(hs)
|
||||
self.ratelimiter = hs.get_federation_ratelimiter()
|
||||
|
|
@ -376,9 +376,7 @@ class FederationSendServlet(BaseFederationServlet):
|
|||
RATELIMIT = False
|
||||
|
||||
def __init__(self, handler, server_name, **kwargs):
|
||||
super(FederationSendServlet, self).__init__(
|
||||
handler, server_name=server_name, **kwargs
|
||||
)
|
||||
super().__init__(handler, server_name=server_name, **kwargs)
|
||||
self.server_name = server_name
|
||||
|
||||
# This is when someone is trying to send us a bunch of data.
|
||||
|
|
@ -773,9 +771,7 @@ class PublicRoomList(BaseFederationServlet):
|
|||
PATH = "/publicRooms"
|
||||
|
||||
def __init__(self, handler, authenticator, ratelimiter, server_name, allow_access):
|
||||
super(PublicRoomList, self).__init__(
|
||||
handler, authenticator, ratelimiter, server_name
|
||||
)
|
||||
super().__init__(handler, authenticator, ratelimiter, server_name)
|
||||
self.allow_access = allow_access
|
||||
|
||||
async def on_GET(self, origin, content, query):
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue