From 108a2651033a6f13e055253c068d91219bea5bb4 Mon Sep 17 00:00:00 2001 From: Jonathan Ehwald Date: Fri, 26 Jul 2024 04:17:36 +0200 Subject: [PATCH 1/2] Fix asgi handler scope argument type --- strawberry/asgi/__init__.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/strawberry/asgi/__init__.py b/strawberry/asgi/__init__.py index c3c01cb9b4..1185a1dfe8 100644 --- a/strawberry/asgi/__init__.py +++ b/strawberry/asgi/__init__.py @@ -117,12 +117,12 @@ def __init__( else: self.graphql_ide = graphql_ide - async def __call__(self, scope: Request, receive: Receive, send: Send) -> None: + async def __call__(self, scope: Scope, receive: Receive, send: Send) -> None: if scope["type"] == "http": - return await self.handle_http(scope, receive, send) # type: ignore + return await self.handle_http(scope, receive, send) elif scope["type"] == "websocket": - ws = WebSocket(scope, receive=receive, send=send) # type: ignore + ws = WebSocket(scope, receive=receive, send=send) preferred_protocol = self.pick_preferred_protocol(ws) if preferred_protocol == GRAPHQL_TRANSPORT_WS_PROTOCOL: From cdadf18ea958407e4b39ce794da6ebc6244cf971 Mon Sep 17 00:00:00 2001 From: Jonathan Ehwald Date: Fri, 26 Jul 2024 04:23:44 +0200 Subject: [PATCH 2/2] Add release file --- RELEASE.md | 3 +++ 1 file changed, 3 insertions(+) create mode 100644 RELEASE.md diff --git a/RELEASE.md b/RELEASE.md new file mode 100644 index 0000000000..8fa43517d7 --- /dev/null +++ b/RELEASE.md @@ -0,0 +1,3 @@ +Release type: patch + +This release fixes the type of the ASGI request handler's `scope` argument, making type checkers ever so slightly happier.