@@ -648,15 +648,15 @@ def test_resize_1d(store: MemoryStore, zarr_format: ZarrFormat) -> None:
648
648
a = np .arange (105 , dtype = "i4" )
649
649
z [:] = a
650
650
assert (105 ,) == z .shape
651
- assert (105 ,) == z [:].shape # type: ignore
651
+ assert (105 ,) == z [:].shape # type: ignore[union-attr]
652
652
assert np .dtype ("i4" ) == z .dtype
653
- assert np .dtype ("i4" ) == z [:].dtype # type: ignore
653
+ assert np .dtype ("i4" ) == z [:].dtype # type: ignore[union-attr]
654
654
assert (10 ,) == z .chunks
655
655
np .testing .assert_array_equal (a , z [:])
656
656
657
657
z .resize (205 )
658
658
assert (205 ,) == z .shape
659
- assert (205 ,) == z [:].shape # type: ignore
659
+ assert (205 ,) == z [:].shape # type: ignore[union-attr]
660
660
assert np .dtype ("i4" ) == z .dtype
661
661
assert np .dtype ("i4" ) == z [:].dtype
662
662
assert (10 ,) == z .chunks
@@ -665,17 +665,17 @@ def test_resize_1d(store: MemoryStore, zarr_format: ZarrFormat) -> None:
665
665
666
666
z .resize (55 )
667
667
assert (55 ,) == z .shape
668
- assert (55 ,) == z [:].shape
668
+ assert (55 ,) == z [:].shape # type: ignore[union-attr]
669
669
assert np .dtype ("i4" ) == z .dtype
670
- assert np .dtype ("i4" ) == z [:].dtype
670
+ assert np .dtype ("i4" ) == z [:].dtype # type: ignore[union-attr]
671
671
assert (10 ,) == z .chunks
672
672
np .testing .assert_array_equal (a [:55 ], z [:])
673
673
674
674
# via shape setter
675
675
new_shape = (105 ,)
676
676
z .shape = new_shape
677
677
assert new_shape == z .shape
678
- assert new_shape == z [:].shape
678
+ assert new_shape == z [:].shape # type: ignore[union-attr]
679
679
680
680
681
681
@pytest .mark .parametrize ("store" , ["memory" ], indirect = True )
@@ -691,15 +691,15 @@ def test_resize_2d(store: MemoryStore, zarr_format: ZarrFormat) -> None:
691
691
a = np .arange (105 * 105 , dtype = "i4" ).reshape ((105 , 105 ))
692
692
z [:] = a
693
693
assert (105 , 105 ) == z .shape
694
- assert (105 , 105 ) == z [:].shape
694
+ assert (105 , 105 ) == z [:].shape # type: ignore[union-attr]
695
695
assert np .dtype ("i4" ) == z .dtype
696
696
assert np .dtype ("i4" ) == z [:].dtype
697
697
assert (10 , 10 ) == z .chunks
698
698
np .testing .assert_array_equal (a , z [:])
699
699
700
700
z .resize ((205 , 205 ))
701
701
assert (205 , 205 ) == z .shape
702
- assert (205 , 205 ) == z [:].shape
702
+ assert (205 , 205 ) == z [:].shape # type: ignore[union-attr]
703
703
assert np .dtype ("i4" ) == z .dtype
704
704
assert np .dtype ("i4" ) == z [:].dtype
705
705
assert (10 , 10 ) == z .chunks
@@ -709,23 +709,23 @@ def test_resize_2d(store: MemoryStore, zarr_format: ZarrFormat) -> None:
709
709
710
710
z .resize ((55 , 55 ))
711
711
assert (55 , 55 ) == z .shape
712
- assert (55 , 55 ) == z [:].shape
712
+ assert (55 , 55 ) == z [:].shape # type: ignore[union-attr]
713
713
assert np .dtype ("i4" ) == z .dtype
714
714
assert np .dtype ("i4" ) == z [:].dtype
715
715
assert (10 , 10 ) == z .chunks
716
716
np .testing .assert_array_equal (a [:55 , :55 ], z [:])
717
717
718
718
z .resize ((55 , 1 ))
719
719
assert (55 , 1 ) == z .shape
720
- assert (55 , 1 ) == z [:].shape
720
+ assert (55 , 1 ) == z [:].shape # type: ignore[union-attr]
721
721
assert np .dtype ("i4" ) == z .dtype
722
722
assert np .dtype ("i4" ) == z [:].dtype
723
723
assert (10 , 10 ) == z .chunks
724
724
np .testing .assert_array_equal (a [:55 , :1 ], z [:])
725
725
726
726
z .resize ((1 , 55 ))
727
727
assert (1 , 55 ) == z .shape
728
- assert (1 , 55 ) == z [:].shape
728
+ assert (1 , 55 ) == z [:].shape # type: ignore[union-attr]
729
729
assert np .dtype ("i4" ) == z .dtype
730
730
assert np .dtype ("i4" ) == z [:].dtype
731
731
assert (10 , 10 ) == z .chunks
@@ -736,7 +736,7 @@ def test_resize_2d(store: MemoryStore, zarr_format: ZarrFormat) -> None:
736
736
new_shape = (105 , 105 )
737
737
z .shape = new_shape
738
738
assert new_shape == z .shape
739
- assert new_shape == z [:].shape
739
+ assert new_shape == z [:].shape # type: ignore[union-attr]
740
740
741
741
742
742
@pytest .mark .parametrize ("store" , ["memory" ], indirect = True )
0 commit comments