Skip to content

Commit 0735a43

Browse files
committed
Switch lstrip to removeprefix
1 parent 1d177c1 commit 0735a43

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/zarr/storage/_obstore.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -245,7 +245,7 @@ async def _transform_list_dir(
245245
# prefix, so we don't double-check that the returned results actually start with the
246246
# given prefix.
247247
prefixes = [obj.lstrip(prefix).lstrip("/") for obj in list_result["common_prefixes"]]
248-
objects = [obj["path"].lstrip(prefix).lstrip("/") for obj in list_result["objects"]]
248+
objects = [obj["path"].removeprefix(prefix).lstrip("/") for obj in list_result["objects"]]
249249
for item in prefixes + objects:
250250
yield item
251251

0 commit comments

Comments
 (0)