Skip to content

Commit

Permalink
Using pyupgrade with --py38-plus (#505)
Browse files Browse the repository at this point in the history
  • Loading branch information
leszekhanusz authored Oct 28, 2024
1 parent 57ef910 commit e355261
Show file tree
Hide file tree
Showing 8 changed files with 8 additions and 8 deletions.
2 changes: 1 addition & 1 deletion gql/transport/exceptions.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ class TransportServerError(TransportError):
code: Optional[int]

def __init__(self, message: str, code: Optional[int] = None):
super(TransportServerError, self).__init__(message)
super().__init__(message)
self.code = code


Expand Down
2 changes: 1 addition & 1 deletion gql/transport/phoenix_channel_websockets.py
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ def __init__(
self.heartbeat_interval: float = heartbeat_interval
self.heartbeat_task: Optional[asyncio.Future] = None
self.subscriptions: Dict[str, Subscription] = {}
super(PhoenixChannelWebsocketsTransport, self).__init__(*args, **kwargs)
super().__init__(*args, **kwargs)

async def _initialize(self) -> None:
"""Join the specified channel and wait for the connection ACK.
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@
# Get version from __version__.py file
current_folder = os.path.abspath(os.path.dirname(__file__))
about = {}
with open(os.path.join(current_folder, "gql", "__version__.py"), "r") as f:
with open(os.path.join(current_folder, "gql", "__version__.py")) as f:
exec(f.read(), about)

setup(
Expand Down
2 changes: 1 addition & 1 deletion tests/fixtures/aws/fake_credentials.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import pytest


class FakeCredentials(object):
class FakeCredentials:
def __init__(
self, access_key=None, secret_key=None, method=None, token=None, region=None
):
Expand Down
2 changes: 1 addition & 1 deletion tests/fixtures/aws/fake_request.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import pytest


class FakeRequest(object):
class FakeRequest:
headers = None

def __init__(self, request_props=None):
Expand Down
2 changes: 1 addition & 1 deletion tests/fixtures/aws/fake_session.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import pytest


class FakeSession(object):
class FakeSession:
def __init__(self, credentials, region_name):
self._credentials = credentials
self._region_name = region_name
Expand Down
2 changes: 1 addition & 1 deletion tests/fixtures/aws/fake_signer.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ def _fake_signer_factory(request=None):
yield _fake_signer_factory


class FakeSigner(object):
class FakeSigner:
def __init__(self, request=None) -> None:
self.request = request

Expand Down
2 changes: 1 addition & 1 deletion tests/test_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ def http_transport_query():
def test_request_transport_not_implemented(http_transport_query):
class RandomTransport(Transport):
def execute(self):
super(RandomTransport, self).execute(http_transport_query)
super().execute(http_transport_query)

with pytest.raises(NotImplementedError) as exc_info:
RandomTransport().execute()
Expand Down

0 comments on commit e355261

Please sign in to comment.