Skip to content

Commit

Permalink
[pre-commit.ci] pre-commit autoupdate (#201)
Browse files Browse the repository at this point in the history
<!--pre-commit.ci start-->
updates:
- [github.com/astral-sh/ruff-pre-commit: v0.8.6 →
v0.9.1](astral-sh/ruff-pre-commit@v0.8.6...v0.9.1)
<!--pre-commit.ci end-->

---------

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
  • Loading branch information
pre-commit-ci[bot] authored Jan 13, 2025
1 parent cd3bbae commit 774c5df
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 8 deletions.
2 changes: 1 addition & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
repos:
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.8.6
rev: v0.9.1
hooks:
- id: ruff
name: ruff (lint)
Expand Down
12 changes: 5 additions & 7 deletions src/openneuro/_download.py
Original file line number Diff line number Diff line change
Expand Up @@ -175,7 +175,7 @@ def _check_snapshot_exists(
raise RuntimeError(
f'The requested snapshot with the tag "{tag}" '
f"does not exist for dataset {dataset_id}. "
f'Existing tags: {", ".join(tags)}'
f"Existing tags: {', '.join(tags)}"
)


Expand Down Expand Up @@ -444,9 +444,7 @@ async def _download_file(
)
return
else:
raise RuntimeError(
f"Timeout when trying to download " f"{outfile}."
)
raise RuntimeError(f"Timeout when trying to download {outfile}.")


async def _retry_download(
Expand Down Expand Up @@ -642,7 +640,7 @@ def _get_local_tag(*, dataset_id: str, dataset_dir: Path) -> str | None:
f"appears to be different from the one you "
f'requested to download. "DatasetDOI" field in '
f'local "dataset_description.json": '
f'{local_json["DatasetDOI"]}. '
f"{local_json['DatasetDOI']}. "
f"Requested dataset: {dataset_id}"
)

Expand Down Expand Up @@ -673,7 +671,7 @@ def _iterate_filenames(
for entity in files:
entity["parent_tree"] = parent_tree
if root:
entity["filename"] = f'{root}/{entity["filename"]}'
entity["filename"] = f"{root}/{entity['filename']}"
if entity["directory"]:
directories.append(entity)
else:
Expand Down Expand Up @@ -913,7 +911,7 @@ def download(
+ "\n"
)
else:
extra = "There were no similar filenames found in the " "metadata. "
extra = "There were no similar filenames found in the metadata. "
raise RuntimeError(
f"Could not find path in the dataset:\n- {this}\n{extra}"
"Please check your includes."
Expand Down

0 comments on commit 774c5df

Please sign in to comment.