Skip to content

Commit

Permalink
Remove old Python 2 syntax in super() calls
Browse files Browse the repository at this point in the history
  • Loading branch information
miguelgrinberg committed Jul 5, 2023
1 parent 1b04a56 commit b37ee76
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 6 deletions.
4 changes: 2 additions & 2 deletions src/engineio/async_drivers/eventlet.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
class WebSocketWSGI(_WebSocketWSGI):
def __init__(self, handler, server):
print(server.max_http_buffer_size)
super(WebSocketWSGI, self).__init__(
super().__init__(
handler, max_frame_length=int(server.max_http_buffer_size))
self._sock = None

Expand All @@ -19,7 +19,7 @@ def __call__(self, environ, start_response):
'See the Deployment section of the '
'documentation for more information.')
self._sock = environ['eventlet.input'].get_socket()
return super(WebSocketWSGI, self).__call__(environ, start_response)
return super().__call__(environ, start_response)


_async = {
Expand Down
2 changes: 1 addition & 1 deletion src/engineio/async_drivers/gevent.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ class Thread(gevent.Greenlet): # pragma: no cover
with the standard library's Thread class.
"""
def __init__(self, target, args=[], kwargs={}):
super(Thread, self).__init__(target, *args, **kwargs)
super().__init__(target, *args, **kwargs)

def _run(self):
return self.run()
Expand Down
2 changes: 1 addition & 1 deletion src/engineio/async_drivers/gevent_uwsgi.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ class Thread(gevent.Greenlet): # pragma: no cover
with the standard library's Thread class.
"""
def __init__(self, target, args=[], kwargs={}):
super(Thread, self).__init__(target, *args, **kwargs)
super().__init__(target, *args, **kwargs)

def _run(self):
return self.run()
Expand Down
3 changes: 1 addition & 2 deletions src/engineio/middleware.py
Original file line number Diff line number Diff line change
Expand Up @@ -83,5 +83,4 @@ class Middleware(WSGIApp):
"""This class has been renamed to ``WSGIApp`` and is now deprecated."""
def __init__(self, engineio_app, wsgi_app=None,
engineio_path='engine.io'):
super(Middleware, self).__init__(engineio_app, wsgi_app,
engineio_path=engineio_path)
super().__init__(engineio_app, wsgi_app, engineio_path=engineio_path)

0 comments on commit b37ee76

Please sign in to comment.