Skip to content

Commit 9adf281

Browse files
Apply ruff rule RUF029
RUF029 Function is declared `async`, but doesn't `await` or use `async` features. This future rule is triggered in preview mode.
1 parent b8b52ef commit 9adf281

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

tests/v3/test_metadata/test_v3.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -279,7 +279,7 @@ def test_metadata_to_dict(
279279
# assert result["fill_value"] == fill_value
280280

281281

282-
async def test_invalid_dtype_raises() -> None:
282+
def test_invalid_dtype_raises() -> None:
283283
metadata_dict = {
284284
"zarr_format": 3,
285285
"node_type": "array",
@@ -303,7 +303,7 @@ def test_parse_invalid_dtype_raises(data):
303303
@pytest.mark.parametrize(
304304
"data_type,fill_value", [("uint8", -1), ("int32", 22.5), ("float32", "foo")]
305305
)
306-
async def test_invalid_fill_value_raises(data_type: str, fill_value: float) -> None:
306+
def test_invalid_fill_value_raises(data_type: str, fill_value: float) -> None:
307307
metadata_dict = {
308308
"zarr_format": 3,
309309
"node_type": "array",
@@ -319,7 +319,7 @@ async def test_invalid_fill_value_raises(data_type: str, fill_value: float) -> N
319319

320320

321321
@pytest.mark.parametrize("fill_value", [("NaN"), "Infinity", "-Infinity"])
322-
async def test_special_float_fill_values(fill_value: str) -> None:
322+
def test_special_float_fill_values(fill_value: str) -> None:
323323
metadata_dict = {
324324
"zarr_format": 3,
325325
"node_type": "array",

tests/v3/test_sync.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ def foo() -> str:
8282
# yields a warning because it is never awaited by the inner function
8383
return "foo"
8484

85-
async def bar() -> str:
85+
def bar() -> str:
8686
return sync(foo(), loop=sync_loop) # type: ignore[arg-type]
8787

8888
with pytest.raises(SyncError):

0 commit comments

Comments
 (0)