Skip to content

Commit 2331b99

Browse files
authored
fix type hints for hypothesis test (#3240)
1 parent b267ff6 commit 2331b99

File tree

1 file changed

+3
-5
lines changed

1 file changed

+3
-5
lines changed

src/zarr/testing/strategies.py

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -256,15 +256,13 @@ def arrays(
256256
arrays = numpy_arrays(shapes=shapes)
257257
nparray = draw(arrays, label="array data")
258258
chunk_shape = draw(chunk_shapes(shape=nparray.shape), label="chunk shape")
259-
extra_kwargs = {}
259+
dim_names: None | list[str | None] = None
260260
if zarr_format == 3 and all(c > 0 for c in chunk_shape):
261261
shard_shape = draw(
262262
st.none() | shard_shapes(shape=nparray.shape, chunk_shape=chunk_shape),
263263
label="shard shape",
264264
)
265-
extra_kwargs["dimension_names"] = draw(
266-
dimension_names(ndim=nparray.ndim), label="dimension names"
267-
)
265+
dim_names = draw(dimension_names(ndim=nparray.ndim), label="dimension names")
268266
else:
269267
shard_shape = None
270268
# test that None works too.
@@ -285,7 +283,7 @@ def arrays(
285283
attributes=attributes,
286284
# compressor=compressor, # FIXME
287285
fill_value=fill_value,
288-
**extra_kwargs,
286+
dimension_names=dim_names,
289287
)
290288

291289
assert isinstance(a, Array)

0 commit comments

Comments
 (0)