Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enforce ruff/flynt rules (FLY) #2240

Merged
merged 2 commits into from
Sep 25, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion src/zarr/core/group.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion src/zarr/store/remote.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)