Skip to content

Commit

Permalink
ruff
Browse files Browse the repository at this point in the history
  • Loading branch information
kristjanvalur committed Sep 8, 2024
1 parent d17a4d4 commit a1d0695
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,6 @@
from strawberry.subscriptions.protocols.graphql_transport_ws.types import (
GraphQLTransportMessage,
)



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

async def operation_task(self, operation: Operation) -> None:
"""
The operation task's top level method. Cleans-up and de-registers the operation
once it is done.
"""The operation task's top level method.
Cleans-up and de-registers the operation once it is done.
"""
task = asyncio.current_task()
assert task is not None # for type checkers
Expand Down
4 changes: 2 additions & 2 deletions tests/websockets/test_graphql_transport_ws.py
Original file line number Diff line number Diff line change
Expand Up @@ -1192,8 +1192,8 @@ async def op(*args: Any, **kwargs: Any):
).as_dict()
)

# wait for the error to be logged
while not wakeup:
# wait for the error to be logged. Must use timed loop and not event.
while not wakeup: # noqa: ASYNC110
await asyncio.sleep(0.01)
# and another little bit, for the thread to finish
await asyncio.sleep(0.01)
Expand Down

0 comments on commit a1d0695

Please sign in to comment.