Skip to content

Commit a1d0695

Browse files
committed
ruff
1 parent d17a4d4 commit a1d0695

File tree

2 files changed

+5
-6
lines changed

2 files changed

+5
-6
lines changed

strawberry/subscriptions/protocols/graphql_transport_ws/handlers.py

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,6 @@
4343
from strawberry.subscriptions.protocols.graphql_transport_ws.types import (
4444
GraphQLTransportMessage,
4545
)
46-
4746

4847

4948
class BaseGraphQLTransportWSHandler(ABC):
@@ -294,9 +293,9 @@ async def single_result() -> AsyncIterator[ExecutionResult]:
294293
self.operations[message.id] = operation
295294

296295
async def operation_task(self, operation: Operation) -> None:
297-
"""
298-
The operation task's top level method. Cleans-up and de-registers the operation
299-
once it is done.
296+
"""The operation task's top level method.
297+
298+
Cleans-up and de-registers the operation once it is done.
300299
"""
301300
task = asyncio.current_task()
302301
assert task is not None # for type checkers

tests/websockets/test_graphql_transport_ws.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1192,8 +1192,8 @@ async def op(*args: Any, **kwargs: Any):
11921192
).as_dict()
11931193
)
11941194

1195-
# wait for the error to be logged
1196-
while not wakeup:
1195+
# wait for the error to be logged. Must use timed loop and not event.
1196+
while not wakeup: # noqa: ASYNC110
11971197
await asyncio.sleep(0.01)
11981198
# and another little bit, for the thread to finish
11991199
await asyncio.sleep(0.01)

0 commit comments

Comments
 (0)