Skip to content

Commit

Permalink
black
Browse files Browse the repository at this point in the history
  • Loading branch information
qinxuye committed Mar 12, 2024
1 parent 0fa808d commit 58a90bb
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 5 deletions.
2 changes: 1 addition & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
repos:
- repo: https://github.com/psf/black
rev: 23.12.0
rev: 24.2.0
hooks:
- id: black
files: python/xoscar
Expand Down
6 changes: 3 additions & 3 deletions python/xoscar/backends/communication/dummy.py
Original file line number Diff line number Diff line change
Expand Up @@ -97,9 +97,9 @@ class DummyServer(Server):
else tuple()
)

_address_to_instances: weakref.WeakValueDictionary[
str, "DummyServer"
] = weakref.WeakValueDictionary()
_address_to_instances: weakref.WeakValueDictionary[str, "DummyServer"] = (
weakref.WeakValueDictionary()
)
_channels: list[ChannelType]
_tasks: list[asyncio.Task]
scheme: str | None = "dummy"
Expand Down
6 changes: 5 additions & 1 deletion python/xoscar/tests/test_generator.py
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,11 @@ async def chat(self):
address=address, uid=WorkerActor.uid()
)
yield "sync"
async for x in await worker_actor.chat(): # this is much confused. I will suggest use async generators only.
async for (
x
) in (
await worker_actor.chat()
): # this is much confused. I will suggest use async generators only.
yield x

yield "async"
Expand Down

0 comments on commit 58a90bb

Please sign in to comment.