Skip to content

Commit 1569eca

Browse files
Enforce ruff/flynt rules (FLY) (zarr-developers#2240)
* Apply ruff/flynt rule FLY002 FLY002 Consider f-string instead of string join * Enforce ruff/flynt rules (FLY)
1 parent 692593b commit 1569eca

File tree

3 files changed

+3
-2
lines changed

3 files changed

+3
-2
lines changed

pyproject.toml

+1
Original file line numberDiff line numberDiff line change
@@ -208,6 +208,7 @@ extend-exclude = [
208208
[tool.ruff.lint]
209209
extend-select = [
210210
"B", # flake8-bugbear
211+
"FLY", # flynt
211212
"I", # isort
212213
"ISC", # flake8-implicit-str-concat
213214
"PGH", # pygrep-hooks

src/zarr/core/group.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -676,7 +676,7 @@ async def _members(
676676
async for child_key, val in obj._members(
677677
max_depth=max_depth, current_depth=current_depth + 1
678678
):
679-
yield "/".join([key, child_key]), val
679+
yield f"{key}/{child_key}", val
680680
except KeyError:
681681
# keyerror is raised when `key` names an object (in the object storage sense),
682682
# as opposed to a prefix, in the store under the prefix associated with this group

src/zarr/store/remote.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -234,6 +234,6 @@ async def list_prefix(self, prefix: str) -> AsyncGenerator[str, None]:
234234
AsyncGenerator[str, None]
235235
"""
236236

237-
find_str = "/".join([self.path, prefix])
237+
find_str = f"{self.path}/{prefix}"
238238
for onefile in await self.fs._find(find_str, detail=False, maxdepth=None, withdirs=False):
239239
yield onefile.removeprefix(find_str)

0 commit comments

Comments
 (0)