Skip to content

Commit

Permalink
[pre-commit.ci] auto fixes from pre-commit.com hooks
Browse files Browse the repository at this point in the history
for more information, see https://pre-commit.ci
  • Loading branch information
pre-commit-ci[bot] committed Aug 14, 2023
1 parent 7c0ca67 commit 2a35cab
Show file tree
Hide file tree
Showing 6 changed files with 7 additions and 7 deletions.
4 changes: 2 additions & 2 deletions strawberry/channels/handlers/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@ async def channel_listen(
awaitable = asyncio.wait_for(awaitable, timeout)
try:
yield await awaitable
except asyncio.TimeoutError: # noqa: PERF203
except asyncio.TimeoutError:
# TODO: shall we add log here and maybe in the suppress below?
return
finally:
Expand Down Expand Up @@ -215,7 +215,7 @@ async def _listen_to_channel_generator(
awaitable = asyncio.wait_for(awaitable, timeout)
try:
yield await awaitable
except asyncio.TimeoutError: # noqa: PERF203
except asyncio.TimeoutError:
# TODO: shall we add log here and maybe in the suppress below?
return

Expand Down
2 changes: 1 addition & 1 deletion strawberry/cli/commands/upgrade/_fake_progress.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,5 +17,5 @@ def add_task(self, *args: Any, **kwargs: Any) -> TaskID:
def __enter__(self) -> "FakeProgress":
return self

def __exit__(self, *args: Any, **kwargs: Any) -> None:
def __exit__(self, *args: object, **kwargs: Any) -> None:
pass
2 changes: 1 addition & 1 deletion strawberry/federation/schema.py
Original file line number Diff line number Diff line change
Expand Up @@ -209,7 +209,7 @@ def entities_resolver(

try:
result = get_result()
except Exception as e: # noqa: PERF203
except Exception as e:
result = GraphQLError(
f"Unable to resolve reference for {definition.origin}",
original_error=e,
Expand Down
2 changes: 1 addition & 1 deletion tests/fastapi/test_context.py
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ class Query:
@strawberry.field
def abc(self, info: Info[Any, None]) -> str:
assert info.context.get("request") is not None
assert "connection_params" not in info.context.keys()
assert "connection_params" not in info.context
assert info.context.get("strawberry") == "rocks"
return "abc"

Expand Down
2 changes: 1 addition & 1 deletion tests/http/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ def _get_http_client_classes() -> Generator[Any, None, None]:
importlib.import_module(f".{module}", package="tests.http.clients"),
client,
)
except ImportError: # noqa: PERF203
except ImportError:
client_class = None

yield pytest.param(
Expand Down
2 changes: 1 addition & 1 deletion tests/websockets/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ def _get_http_client_classes() -> Generator[Any, None, None]:
client_class = getattr(
importlib.import_module(f"tests.http.clients.{module}"), client
)
except ImportError: # noqa: PERF203
except ImportError:
client_class = None

yield pytest.param(
Expand Down

0 comments on commit 2a35cab

Please sign in to comment.