11from __future__ import annotations
22
33import inspect
4- import pathlib
54import re
65from typing import TYPE_CHECKING
76
4645from zarr .storage ._utils import normalize_path
4746from zarr .testing .utils import gpu_test
4847
49- if TYPE_CHECKING :
50- from collections .abc import Callable
51- from pathlib import Path
52-
5348
5449def test_create (memory_store : Store ) -> None :
5550 store = memory_store
@@ -1317,15 +1312,15 @@ def test_v2_with_v3_compressor() -> None:
13171312 )
13181313
13191314
1320- def add_empty_file (path : Path ) -> Path :
1315+ def add_empty_file (path : pathlib . Path ) -> pathlib . Path :
13211316 fpath = path / "a.txt"
13221317 fpath .touch ()
13231318 return fpath
13241319
13251320
13261321@pytest .mark .parametrize ("create_function" , [create_array , from_array ])
13271322@pytest .mark .parametrize ("overwrite" , [True , False ])
1328- def test_no_overwrite_array (tmp_path : Path , create_function : Callable , overwrite : bool ) -> None : # type:ignore[type-arg]
1323+ def test_no_overwrite_array (tmp_path : pathlib . Path , create_function : Callable , overwrite : bool ) -> None : # type:ignore[type-arg]
13291324 store = zarr .storage .LocalStore (tmp_path )
13301325 existing_fpath = add_empty_file (tmp_path )
13311326
@@ -1339,7 +1334,7 @@ def test_no_overwrite_array(tmp_path: Path, create_function: Callable, overwrite
13391334
13401335@pytest .mark .parametrize ("create_function" , [create_group , group ])
13411336@pytest .mark .parametrize ("overwrite" , [True , False ])
1342- def test_no_overwrite_group (tmp_path : Path , create_function : Callable , overwrite : bool ) -> None : # type:ignore[type-arg]
1337+ def test_no_overwrite_group (tmp_path : pathlib . Path , create_function : Callable , overwrite : bool ) -> None : # type:ignore[type-arg]
13431338 store = zarr .storage .LocalStore (tmp_path )
13441339 existing_fpath = add_empty_file (tmp_path )
13451340
@@ -1353,7 +1348,7 @@ def test_no_overwrite_group(tmp_path: Path, create_function: Callable, overwrite
13531348
13541349@pytest .mark .parametrize ("open_func" , [zarr .open , open_group ])
13551350@pytest .mark .parametrize ("mode" , ["r" , "r+" , "a" , "w" , "w-" ])
1356- def test_no_overwrite_open (tmp_path : Path , open_func : Callable , mode : str ) -> None : # type:ignore[type-arg]
1351+ def test_no_overwrite_open (tmp_path : pathlib . Path , open_func : Callable , mode : str ) -> None : # type:ignore[type-arg]
13571352 store = zarr .storage .LocalStore (tmp_path )
13581353 existing_fpath = add_empty_file (tmp_path )
13591354
@@ -1366,7 +1361,7 @@ def test_no_overwrite_open(tmp_path: Path, open_func: Callable, mode: str) -> No
13661361 assert existing_fpath .exists ()
13671362
13681363
1369- def test_no_overwrite_load (tmp_path : Path ) -> None :
1364+ def test_no_overwrite_load (tmp_path : pathlib . Path ) -> None :
13701365 store = zarr .storage .LocalStore (tmp_path )
13711366 existing_fpath = add_empty_file (tmp_path )
13721367
0 commit comments