diff --git a/strawberry/channels/handlers/base.py b/strawberry/channels/handlers/base.py index 1c91927ce00..1dd09ea7c9f 100644 --- a/strawberry/channels/handlers/base.py +++ b/strawberry/channels/handlers/base.py @@ -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: @@ -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 diff --git a/strawberry/cli/commands/upgrade/_fake_progress.py b/strawberry/cli/commands/upgrade/_fake_progress.py index 40d92da5a08..6aacc361794 100644 --- a/strawberry/cli/commands/upgrade/_fake_progress.py +++ b/strawberry/cli/commands/upgrade/_fake_progress.py @@ -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 diff --git a/strawberry/federation/schema.py b/strawberry/federation/schema.py index c7b10e4e2a7..a0a29ca4ad0 100644 --- a/strawberry/federation/schema.py +++ b/strawberry/federation/schema.py @@ -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, diff --git a/tests/fastapi/test_context.py b/tests/fastapi/test_context.py index 7b668e00968..ffd7ad64f9a 100644 --- a/tests/fastapi/test_context.py +++ b/tests/fastapi/test_context.py @@ -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" diff --git a/tests/http/conftest.py b/tests/http/conftest.py index 81d99115f3b..487a1328ea8 100644 --- a/tests/http/conftest.py +++ b/tests/http/conftest.py @@ -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( diff --git a/tests/websockets/conftest.py b/tests/websockets/conftest.py index 4960c5bde77..00cfa6ac14d 100644 --- a/tests/websockets/conftest.py +++ b/tests/websockets/conftest.py @@ -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(