@@ -338,7 +338,7 @@ def test_roundtrip_with_compression() -> None:
338338 metadata = grid1 .to_dict ()
339339
340340 # Verify it's compressed
341- assert metadata ["configuration" ]["chunk_shapes" ] == [[[10 , 6 ]], [[5 , 5 ]]]
341+ assert metadata ["configuration" ]["chunk_shapes" ] == [[[10 , 6 ]], [[5 , 5 ]]] # type: ignore[call-overload, index]
342342
343343 # Deserialize from dict
344344 grid2 = RectilinearChunkGrid ._from_dict (metadata )
@@ -396,7 +396,7 @@ async def test_api_create_array_with_rle_simple() -> None:
396396 arr = await zarr .api .asynchronous .create_array (
397397 store = store ,
398398 shape = (60 , 60 ),
399- chunks = [[[10 , 6 ]], [[10 , 6 ]]],
399+ chunks = [[[10 , 6 ]], [[10 , 6 ]]], # type: ignore[list-item]
400400 dtype = "i4" ,
401401 zarr_format = 3 ,
402402 )
@@ -423,7 +423,7 @@ async def test_api_create_array_with_mixed_rle_and_explicit() -> None:
423423 arr = await zarr .api .asynchronous .create_array (
424424 store = store ,
425425 shape = (6 , 6 ),
426- chunks = [[[2 , 3 ]], [1 , [2 , 1 ], 3 ]],
426+ chunks = [[[2 , 3 ]], [1 , [2 , 1 ], 3 ]], # type: ignore[list-item]
427427 dtype = "f8" ,
428428 zarr_format = 3 ,
429429 )
@@ -435,7 +435,7 @@ async def test_api_create_array_with_mixed_rle_and_explicit() -> None:
435435 data = np .random .random ((6 , 6 ))
436436 await arr .setitem (slice (None ), data )
437437 result = await arr .getitem (slice (None ))
438- np .testing .assert_array_almost_equal (result , data )
438+ np .testing .assert_array_almost_equal (result , data ) # type: ignore[arg-type]
439439
440440
441441async def test_api_rle_chunk_grid_roundtrip_persistence () -> None :
@@ -447,7 +447,7 @@ async def test_api_rle_chunk_grid_roundtrip_persistence() -> None:
447447 store = store ,
448448 name = "rle_array" ,
449449 shape = (100 , 50 ),
450- chunks = [[[10 , 10 ]], [[10 , 5 ]]],
450+ chunks = [[[10 , 10 ]], [[10 , 5 ]]], # type: ignore[list-item]
451451 dtype = "u2" ,
452452 zarr_format = 3 ,
453453 )
@@ -479,10 +479,10 @@ async def test_api_rle_spec_example() -> None:
479479 store = store ,
480480 shape = (6 , 6 , 6 , 4 , 6 ),
481481 chunks = [
482- [[2 , 3 ]],
483- [[1 , 6 ]],
484- [1 , [2 , 1 ], 3 ],
485- [[1 , 3 ], 1 ],
482+ [[2 , 3 ]], # type: ignore[list-item]
483+ [[1 , 6 ]], # type: ignore[list-item]
484+ [1 , [2 , 1 ], 3 ], # type: ignore[list-item]
485+ [[1 , 3 ], 1 ], # type: ignore[list-item]
486486 [6 ],
487487 ],
488488 dtype = "i1" ,
@@ -512,7 +512,7 @@ def test_api_synchronous_api_with_rle_chunks() -> None:
512512 arr = zarr .create_array (
513513 store = store ,
514514 shape = (30 , 40 ),
515- chunks = [[[10 , 3 ]], [[10 , 4 ]]],
515+ chunks = [[[10 , 3 ]], [[10 , 4 ]]], # type: ignore[list-item]
516516 dtype = "f4" ,
517517 zarr_format = 3 ,
518518 )
@@ -523,7 +523,7 @@ def test_api_synchronous_api_with_rle_chunks() -> None:
523523 # Test write/read
524524 data = np .random .random ((30 , 40 )).astype ("f4" )
525525 arr [:] = data
526- np .testing .assert_array_almost_equal (arr [:], data )
526+ np .testing .assert_array_almost_equal (arr [:], data ) # type: ignore[arg-type]
527527
528528
529529async def test_api_rle_with_zero_count () -> None :
@@ -533,7 +533,7 @@ async def test_api_rle_with_zero_count() -> None:
533533 arr = await zarr .api .asynchronous .create_array (
534534 store = store ,
535535 shape = (10 , 10 ),
536- chunks = [[[5 , 0 ], 5 , 5 ], [[5 , 2 ]]],
536+ chunks = [[[5 , 0 ], 5 , 5 ], [[5 , 2 ]]], # type: ignore[list-item]
537537 dtype = "u1" ,
538538 zarr_format = 3 ,
539539 )
@@ -556,7 +556,7 @@ def test_api_group_create_array_with_rle() -> None:
556556 arr = root .create_array (
557557 "rle_test" ,
558558 shape = (50 , 50 ),
559- chunks = [[[10 , 5 ]], [[10 , 5 ]]],
559+ chunks = [[[10 , 5 ]], [[10 , 5 ]]], # type: ignore[list-item]
560560 dtype = "i8" ,
561561 )
562562
@@ -568,7 +568,7 @@ def test_api_group_create_array_with_rle() -> None:
568568
569569 # Verify the array is accessible from the group
570570 arr2 = root ["rle_test" ]
571- assert isinstance (arr2 .metadata .chunk_grid , RectilinearChunkGrid )
571+ assert isinstance (arr2 .metadata .chunk_grid , RectilinearChunkGrid ) # type: ignore[union-attr]
572572
573573
574574async def test_api_rle_with_large_repeat_count () -> None :
@@ -578,7 +578,7 @@ async def test_api_rle_with_large_repeat_count() -> None:
578578 arr = await zarr .api .asynchronous .create_array (
579579 store = store ,
580580 shape = (1000 , 1000 ),
581- chunks = [[[10 , 100 ]], [[10 , 100 ]]],
581+ chunks = [[[10 , 100 ]], [[10 , 100 ]]], # type: ignore[list-item]
582582 dtype = "i2" ,
583583 zarr_format = 3 ,
584584 )
@@ -603,7 +603,7 @@ async def test_api_rle_mixed_with_irregular_chunks() -> None:
603603 arr = await zarr .api .asynchronous .create_array (
604604 store = store ,
605605 shape = (100 , 100 ),
606- chunks = [[[10 , 5 ], 50 ], [25 , 30 , 20 , 25 ]],
606+ chunks = [[[10 , 5 ], 50 ], [25 , 30 , 20 , 25 ]], # type: ignore[list-item]
607607 dtype = "u4" ,
608608 zarr_format = 3 ,
609609 )
@@ -630,7 +630,7 @@ async def test_api_v2_rejects_rle_chunks(zarr_format: Literal[2, 3]) -> None:
630630 await zarr .api .asynchronous .create_array (
631631 store = store ,
632632 shape = (60 , 60 ),
633- chunks = [[[10 , 6 ]], [[10 , 6 ]]],
633+ chunks = [[[10 , 6 ]], [[10 , 6 ]]], # type: ignore[list-item]
634634 dtype = "i4" ,
635635 zarr_format = zarr_format ,
636636 )
@@ -648,6 +648,6 @@ async def test_api_from_array_rejects_rle_chunks() -> None:
648648 await zarr .api .asynchronous .from_array (
649649 store = store ,
650650 data = data ,
651- chunks = [[[10 , 3 ]], [[10 , 3 ]]],
651+ chunks = [[[10 , 3 ]], [[10 , 3 ]]], # type: ignore[arg-type]
652652 zarr_format = 3 ,
653653 )
0 commit comments