diff --git a/pyproject.toml b/pyproject.toml index ed6c25893c..5f45d31831 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -208,6 +208,7 @@ extend-exclude = [ [tool.ruff.lint] extend-select = [ "B", # flake8-bugbear + "FLY", # flynt "I", # isort "ISC", # flake8-implicit-str-concat "PGH", # pygrep-hooks diff --git a/src/zarr/core/group.py b/src/zarr/core/group.py index b09968b62a..d7ad960b14 100644 --- a/src/zarr/core/group.py +++ b/src/zarr/core/group.py @@ -676,7 +676,7 @@ async def _members( async for child_key, val in obj._members( max_depth=max_depth, current_depth=current_depth + 1 ): - yield "/".join([key, child_key]), val + yield f"{key}/{child_key}", val except KeyError: # keyerror is raised when `key` names an object (in the object storage sense), # as opposed to a prefix, in the store under the prefix associated with this group diff --git a/src/zarr/store/remote.py b/src/zarr/store/remote.py index 02bda6b1dd..7aea8a3780 100644 --- a/src/zarr/store/remote.py +++ b/src/zarr/store/remote.py @@ -234,6 +234,6 @@ async def list_prefix(self, prefix: str) -> AsyncGenerator[str, None]: AsyncGenerator[str, None] """ - find_str = "/".join([self.path, prefix]) + find_str = f"{self.path}/{prefix}" for onefile in await self.fs._find(find_str, detail=False, maxdepth=None, withdirs=False): yield onefile.removeprefix(find_str)