Skip to content

Commit

Permalink
[pre-commit.ci] pre-commit autoupdate (iterative#10409)
Browse files Browse the repository at this point in the history
* [pre-commit.ci] pre-commit autoupdate

updates:
- [github.com/astral-sh/ruff-pre-commit: v0.4.1 → v0.4.3](astral-sh/ruff-pre-commit@v0.4.1...v0.4.3)

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

---------

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
  • Loading branch information
pre-commit-ci[bot] authored May 10, 2024
1 parent a7c0f6e commit 1848074
Show file tree
Hide file tree
Showing 9 changed files with 10 additions and 10 deletions.
2 changes: 1 addition & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ repos:
- id: sort-simple-yaml
- id: trailing-whitespace
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: 'v0.4.1'
rev: 'v0.4.4'
hooks:
- id: ruff
args: [--fix, --exit-non-zero-on-fix]
Expand Down
2 changes: 1 addition & 1 deletion dvc/commands/gc.py
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ def run(self): # noqa: C901, PLR0912
msg += " of the current and the following repos:"

for repo_path in self.args.repos:
msg += "\n - %s" % os.path.abspath(repo_path)
msg += f"\n - {os.path.abspath(repo_path)}"
else:
msg += " of the current repo."

Expand Down
2 changes: 1 addition & 1 deletion dvc/fs/dvc.py
Original file line number Diff line number Diff line change
Expand Up @@ -360,7 +360,7 @@ def isdvc(self, path, **kwargs) -> bool:
except FileNotFoundError:
return False

def ls(self, path, detail=True, dvc_only=False, **kwargs): # noqa: C901
def ls(self, path, detail=True, dvc_only=False, **kwargs): # noqa: C901, PLR0912
key = self._get_key_from_relative(path)
repo, dvc_fs, subkey = self._get_subrepo_info(key)

Expand Down
4 changes: 2 additions & 2 deletions dvc/repo/artifacts.py
Original file line number Diff line number Diff line change
Expand Up @@ -267,7 +267,7 @@ def _download_studio(
from_infos.append(url)
except DvcException:
raise
except Exception as exc: # noqa: BLE001
except Exception as exc:
raise DvcException(
f"Failed to download artifact '{name}' via Studio"
) from exc
Expand Down Expand Up @@ -369,7 +369,7 @@ def get( # noqa: PLR0913
)
except FileExistsLocallyError:
raise
except Exception as exc: # noqa: BLE001
except Exception as exc:
if saved_exc:
logger.exception(str(saved_exc), exc_info=saved_exc.__cause__)
raise DvcException(
Expand Down
2 changes: 1 addition & 1 deletion dvc/repo/experiments/queue/tempdir.py
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ def _reproduce_entry(
)
except DvcException:
raise
except Exception as exc: # noqa: BLE001
except Exception as exc:
raise DvcException(f"Failed to reproduce experiment '{rev[:7]}'") from exc
finally:
executor.cleanup(infofile)
Expand Down
2 changes: 1 addition & 1 deletion dvc/repo/experiments/queue/workspace.py
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@ def _reproduce_entry(
)
except DvcException:
raise
except Exception as exc: # noqa: BLE001
except Exception as exc:
raise DvcException(f"Failed to reproduce experiment '{rev[:7]}'") from exc
finally:
executor.cleanup(infofile)
Expand Down
2 changes: 1 addition & 1 deletion dvc/repo/gc.py
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ def _used_obj_ids_not_in_remote(


@locked
def gc( # noqa: PLR0913, C901
def gc( # noqa: C901, PLR0912, PLR0913
self: "Repo",
all_branches: bool = False,
cloud: bool = False,
Expand Down
2 changes: 1 addition & 1 deletion dvc/repo/metrics/show.py
Original file line number Diff line number Diff line change
Expand Up @@ -224,7 +224,7 @@ def show(
on_error=on_error,
)
res[rev] = Result(data=result)
except Exception as exc: # noqa: BLE001
except Exception as exc:
if on_error == "raise":
raise

Expand Down
2 changes: 1 addition & 1 deletion dvc/repo/params/show.py
Original file line number Diff line number Diff line change
Expand Up @@ -191,7 +191,7 @@ def show(
on_error=on_error,
)
res[rev] = Result(data=params)
except Exception as exc: # noqa: BLE001
except Exception as exc:
if on_error == "raise":
raise
logger.warning("failed to load params in revision %r, %s", rev, str(exc))
Expand Down

0 comments on commit 1848074

Please sign in to comment.