Skip to content

Commit e355261

Browse files
authored
Using pyupgrade with --py38-plus (#505)
1 parent 57ef910 commit e355261

File tree

8 files changed

+8
-8
lines changed

8 files changed

+8
-8
lines changed

gql/transport/exceptions.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ class TransportServerError(TransportError):
2323
code: Optional[int]
2424

2525
def __init__(self, message: str, code: Optional[int] = None):
26-
super(TransportServerError, self).__init__(message)
26+
super().__init__(message)
2727
self.code = code
2828

2929

gql/transport/phoenix_channel_websockets.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ def __init__(
5252
self.heartbeat_interval: float = heartbeat_interval
5353
self.heartbeat_task: Optional[asyncio.Future] = None
5454
self.subscriptions: Dict[str, Subscription] = {}
55-
super(PhoenixChannelWebsocketsTransport, self).__init__(*args, **kwargs)
55+
super().__init__(*args, **kwargs)
5656

5757
async def _initialize(self) -> None:
5858
"""Join the specified channel and wait for the connection ACK.

setup.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@
6666
# Get version from __version__.py file
6767
current_folder = os.path.abspath(os.path.dirname(__file__))
6868
about = {}
69-
with open(os.path.join(current_folder, "gql", "__version__.py"), "r") as f:
69+
with open(os.path.join(current_folder, "gql", "__version__.py")) as f:
7070
exec(f.read(), about)
7171

7272
setup(

tests/fixtures/aws/fake_credentials.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import pytest
22

33

4-
class FakeCredentials(object):
4+
class FakeCredentials:
55
def __init__(
66
self, access_key=None, secret_key=None, method=None, token=None, region=None
77
):

tests/fixtures/aws/fake_request.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import pytest
22

33

4-
class FakeRequest(object):
4+
class FakeRequest:
55
headers = None
66

77
def __init__(self, request_props=None):

tests/fixtures/aws/fake_session.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import pytest
22

33

4-
class FakeSession(object):
4+
class FakeSession:
55
def __init__(self, credentials, region_name):
66
self._credentials = credentials
77
self._region_name = region_name

tests/fixtures/aws/fake_signer.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ def _fake_signer_factory(request=None):
1111
yield _fake_signer_factory
1212

1313

14-
class FakeSigner(object):
14+
class FakeSigner:
1515
def __init__(self, request=None) -> None:
1616
self.request = request
1717

tests/test_client.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ def http_transport_query():
3030
def test_request_transport_not_implemented(http_transport_query):
3131
class RandomTransport(Transport):
3232
def execute(self):
33-
super(RandomTransport, self).execute(http_transport_query)
33+
super().execute(http_transport_query)
3434

3535
with pytest.raises(NotImplementedError) as exc_info:
3636
RandomTransport().execute()

0 commit comments

Comments
 (0)