Skip to content

Commit c573bff

Browse files
Apply ruff rule RUF029
RUF029 Function is declared `async`, but doesn't `await` or use `async` features.
1 parent 32a6aa3 commit c573bff

File tree

2 files changed

+3
-4
lines changed

2 files changed

+3
-4
lines changed

tests/v3/test_group.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -368,7 +368,7 @@ async def test_asyncgroup_update_attributes(
368368

369369
@pytest.mark.parametrize("store", ("local", "memory"), indirect=["store"])
370370
@pytest.mark.parametrize("zarr_format", (2, 3))
371-
async def test_group_init(store: LocalStore | MemoryStore, zarr_format: ZarrFormat) -> None:
371+
def test_group_init(store: LocalStore | MemoryStore, zarr_format: ZarrFormat) -> None:
372372
agroup = sync(AsyncGroup.create(store=store, zarr_format=zarr_format))
373373
group = Group(agroup)
374374
assert group._async_group == agroup

tests/v3/test_sync.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
import asyncio
2-
import time
32
from collections.abc import AsyncGenerator
43
from unittest.mock import AsyncMock, patch
54

@@ -48,7 +47,7 @@ def test_sync_timeout() -> None:
4847
duration = 0.002
4948

5049
async def foo() -> None:
51-
time.sleep(duration)
50+
await asyncio.sleep(duration)
5251

5352
with pytest.raises(asyncio.TimeoutError):
5453
sync(foo(), timeout=duration / 2)
@@ -82,7 +81,7 @@ def foo() -> str:
8281
# yields a warning because it is never awaited by the inner function
8382
return "foo"
8483

85-
async def bar() -> str:
84+
def bar() -> str:
8685
return sync(foo(), loop=sync_loop)
8786

8887
with pytest.raises(SyncError):

0 commit comments

Comments
 (0)