Skip to content

Commit e86405a

Browse files
committed
Add type: ignore comments back in
1 parent e774c2f commit e86405a

File tree

1 file changed

+10
-10
lines changed

1 file changed

+10
-10
lines changed

tests/test_api.py

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -77,11 +77,11 @@ def test_create(memory_store: Store) -> None:
7777

7878
# create array with float shape
7979
with pytest.raises(TypeError):
80-
z = create(shape=(400.5, 100), store=store, overwrite=True)
80+
z = create(shape=(400.5, 100), store=store, overwrite=True) # type: ignore[arg-type]
8181

8282
# create array with float chunk shape
8383
with pytest.raises(TypeError):
84-
z = create(shape=(400, 100), chunks=(16, 16.5), store=store, overwrite=True)
84+
z = create(shape=(400, 100), chunks=(16, 16.5), store=store, overwrite=True) # type: ignore[arg-type]
8585

8686

8787
# TODO: parametrize over everything this function takes
@@ -290,7 +290,7 @@ def test_save(store: Store, n_args: int, n_kwargs: int, path: None | str) -> Non
290290
assert isinstance(array, Array)
291291
assert_array_equal(array[:], data)
292292
else:
293-
save(store, *args, path=path, **kwargs)
293+
save(store, *args, path=path, **kwargs) # type: ignore[arg-type]
294294
group = zarr.api.synchronous.open(store, path=path)
295295
assert isinstance(group, Group)
296296
for array in group.array_values():
@@ -306,7 +306,7 @@ def test_save_errors() -> None:
306306
save_group("data/group.zarr")
307307
with pytest.raises(TypeError):
308308
# no array provided
309-
save_array("data/group.zarr")
309+
save_array("data/group.zarr") # type: ignore[call-arg]
310310
with pytest.raises(ValueError):
311311
# no arrays provided
312312
save("data/group.zarr")
@@ -1221,9 +1221,9 @@ def test_open_modes_creates_group(tmp_path: Path, mode: str) -> None:
12211221
if mode in ["r", "r+"]:
12221222
# Expect FileNotFoundError to be raised if 'r' or 'r+' mode
12231223
with pytest.raises(FileNotFoundError):
1224-
zarr.open(store=zarr_dir, mode=mode)
1224+
zarr.open(store=zarr_dir, mode=mode) # type: ignore[arg-type]
12251225
else:
1226-
group = zarr.open(store=zarr_dir, mode=mode)
1226+
group = zarr.open(store=zarr_dir, mode=mode) # type: ignore[arg-type]
12271227
assert isinstance(group, Group)
12281228

12291229

@@ -1232,13 +1232,13 @@ async def test_metadata_validation_error() -> None:
12321232
MetadataValidationError,
12331233
match="Invalid value for 'zarr_format'. Expected '2, 3, or None'. Got '3.0'.",
12341234
):
1235-
await zarr.api.asynchronous.open_group(zarr_format="3.0")
1235+
await zarr.api.asynchronous.open_group(zarr_format="3.0") # type: ignore[arg-type]
12361236

12371237
with pytest.raises(
12381238
MetadataValidationError,
12391239
match="Invalid value for 'zarr_format'. Expected '2, 3, or None'. Got '3.0'.",
12401240
):
1241-
await zarr.api.asynchronous.open_array(shape=(1,), zarr_format="3.0")
1241+
await zarr.api.asynchronous.open_array(shape=(1,), zarr_format="3.0") # type: ignore[arg-type]
12421242

12431243

12441244
@pytest.mark.parametrize(
@@ -1304,7 +1304,7 @@ def test_api_exports() -> None:
13041304
assert zarr.api.asynchronous.__all__ == zarr.api.synchronous.__all__
13051305

13061306

1307-
@gpu_test # type: ignore[misc]
1307+
@gpu_test
13081308
@pytest.mark.parametrize(
13091309
"store",
13101310
["local", "memory", "zip"],
@@ -1459,4 +1459,4 @@ def test_auto_chunks(f: Callable[..., Array]) -> None:
14591459
def test_unimplemented_kwarg_warnings(kwarg_name: str) -> None:
14601460
kwargs = {kwarg_name: 1}
14611461
with pytest.warns(RuntimeWarning, match=".* is not yet implemented"):
1462-
zarr.create(shape=(1,), **kwargs)
1462+
zarr.create(shape=(1,), **kwargs) # type: ignore[arg-type]

0 commit comments

Comments
 (0)