Skip to content

Commit 1164d6e

Browse files
committed
Allow for using legacy path parameter side by side with dataset
1 parent 9d3cbb4 commit 1164d6e

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

tiled/adapters/hdf5.py

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -385,6 +385,7 @@ def hdf5_lookup(
385385
specs: Optional[List[Spec]] = None,
386386
access_policy: Optional[AccessPolicy] = None,
387387
dataset: Optional[Union[List[Path], List[str]]] = None,
388+
path: Optional[Union[List[Path], List[str]]] = None,
388389
) -> Union[HDF5Adapter, ArrayAdapter]:
389390
"""
390391
@@ -398,12 +399,17 @@ def hdf5_lookup(
398399
specs :
399400
access_policy :
400401
dataset :
402+
path :
401403
402404
Returns
403405
-------
404406
405407
"""
406-
dataset = dataset or []
408+
409+
if dataset is not None and path is not None:
410+
raise ValueError("dataset and path kwargs should not both be set!")
411+
412+
dataset = dataset or path or []
407413
adapter = HDF5Adapter.from_uri(
408414
data_uri,
409415
structure=structure,

0 commit comments

Comments
 (0)