Skip to content

Commit 93c6f13

Browse files
committed
fix: B023
Function definition does not bind loop variable `ex`.
1 parent 9b94bb7 commit 93c6f13

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

graphql_server/aiohttp/graphqlview.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -177,7 +177,7 @@ async def __call__(self, request):
177177
*(
178178
ex
179179
if ex is not None and is_awaitable(ex)
180-
else wrap_in_async(lambda: ex)()
180+
else wrap_in_async(lambda x: x)(ex)
181181
for ex in execution_results
182182
)
183183
)

graphql_server/quart/graphqlview.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -125,7 +125,7 @@ async def dispatch_request(self):
125125
*(
126126
ex
127127
if ex is not None and is_awaitable(ex)
128-
else wrap_in_async(lambda: ex)()
128+
else wrap_in_async(lambda x: x)(ex)
129129
for ex in execution_results
130130
)
131131
)

graphql_server/sanic/graphqlview.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -130,7 +130,7 @@ async def __handle_request(self, request, *args, **kwargs):
130130
*(
131131
ex
132132
if ex is not None and is_awaitable(ex)
133-
else wrap_in_async(lambda: ex)()
133+
else wrap_in_async(lambda x: x)(ex)
134134
for ex in execution_results
135135
)
136136
)

0 commit comments

Comments
 (0)