Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: using pyupgrade with --py38-plus #505

Merged
merged 1 commit into from
Oct 28, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading