Skip to content

Commit 0013d22

Browse files
committed
annotate store variables as Store
1 parent 426e1cb commit 0013d22

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

tests/test_api.py

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,8 @@ async def test_open_array(store: Store, zarr_format: ZarrFormat) -> None:
7070
assert isinstance(z, Array)
7171
assert z.shape == (100,)
7272

73+
store_w: Store
74+
7375
if isinstance(store, ZipStore):
7476
store.close()
7577
store_w = await ZipStore.open(store.path, mode="w")
@@ -81,6 +83,8 @@ async def test_open_array(store: Store, zarr_format: ZarrFormat) -> None:
8183
assert isinstance(z, Array)
8284
assert z.shape == (200,)
8385

86+
store_r: Store
87+
8488
if isinstance(store, ZipStore):
8589
store_w.close()
8690
store_r = await ZipStore.open(store.path, mode="r")
@@ -121,6 +125,7 @@ async def test_open_group(store: Store) -> None:
121125
# g = open_group(store=store)
122126
# assert isinstance(g, Group)
123127
# assert "foo" not in g
128+
store_r: Store
124129

125130
# open group, read-only
126131
if isinstance(store, ZipStore):
@@ -148,6 +153,8 @@ async def test_open_array_or_group(zarr_format: ZarrFormat, store: Store) -> Non
148153
grp_w = group(store=store, path="group", zarr_format=zarr_format, attributes=grp_attrs)
149154
arr_w = grp_w.create_array(name="foo", shape=(1,))
150155

156+
store_2: Store
157+
151158
if isinstance(store, ZipStore):
152159
store.close()
153160
store_2 = await ZipStore.open(store.path, mode="r")
@@ -176,7 +183,7 @@ async def test_open_group_unspecified_version(store: Store, zarr_format: ZarrFor
176183
_ = await zarr.api.asynchronous.open_group(
177184
store=store, mode="a", zarr_format=zarr_format, attributes={"foo": "bar"}
178185
)
179-
186+
store_2: Store
180187
if isinstance(store, ZipStore):
181188
store.close()
182189
store_2 = await ZipStore.open(store.path, mode="r")

0 commit comments

Comments
 (0)