Skip to content

Commit 2812c5c

Browse files
committed
assertion on path not containing meta should be meta/
this avoids disallowing key names such as 'metabolite', for instance
1 parent 50edad8 commit 2812c5c

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

zarr/hierarchy.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -600,7 +600,7 @@ def _array_iter(self, keys_only, method, recurse):
600600
if self._version == 2:
601601
for key in sorted(listdir(self._store, self._path)):
602602
path = self._key_prefix + key
603-
assert not path.startswith("meta")
603+
assert not path.startswith("meta/")
604604
if contains_array(self._store, path):
605605
_key = key.rstrip("/")
606606
yield _key if keys_only else (_key, self[key])
@@ -615,7 +615,7 @@ def _array_iter(self, keys_only, method, recurse):
615615
if key.endswith(array_sfx):
616616
key = key[:-len(array_sfx)]
617617
path = self._key_prefix + key
618-
assert not path.startswith("meta")
618+
assert not path.startswith("meta/")
619619
if key.endswith('.group' + self._metadata_key_suffix):
620620
# skip group metadata keys
621621
continue

0 commit comments

Comments
 (0)