Skip to content

Commit

Permalink
Apply ruff rule RUF029
Browse files Browse the repository at this point in the history
RUF029 Function is declared `async`, but doesn't `await` or use `async` features.
  • Loading branch information
DimitriPapadopoulos committed Jun 2, 2024
1 parent 32a6aa3 commit 37546da
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
2 changes: 1 addition & 1 deletion tests/v3/test_group.py
Original file line number Diff line number Diff line change
Expand Up @@ -368,7 +368,7 @@ async def test_asyncgroup_update_attributes(

@pytest.mark.parametrize("store", ("local", "memory"), indirect=["store"])
@pytest.mark.parametrize("zarr_format", (2, 3))
async def test_group_init(store: LocalStore | MemoryStore, zarr_format: ZarrFormat) -> None:
def test_group_init(store: LocalStore | MemoryStore, zarr_format: ZarrFormat) -> None:
agroup = sync(AsyncGroup.create(store=store, zarr_format=zarr_format))
group = Group(agroup)
assert group._async_group == agroup
3 changes: 1 addition & 2 deletions tests/v3/test_sync.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import asyncio
import time
from collections.abc import AsyncGenerator
from unittest.mock import AsyncMock, patch

Expand Down Expand Up @@ -48,7 +47,7 @@ def test_sync_timeout() -> None:
duration = 0.002

async def foo() -> None:
time.sleep(duration)
await asyncio.sleep(duration)

with pytest.raises(asyncio.TimeoutError):
sync(foo(), timeout=duration / 2)
Expand Down

0 comments on commit 37546da

Please sign in to comment.