Skip to content

Commit

Permalink
[pre-commit.ci] pre-commit autoupdate (#10473)
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.10 → v0.5.0](astral-sh/ruff-pre-commit@v0.4.10...v0.5.0)

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

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

* lint daemon.py

* lint run.py

* lint fixtures.py

* lint checkout.py

* lint collect.py

* lint index.py

* lint index.py

* lint checkout.py

---------

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: Ivan Shcheklein <[email protected]>
  • Loading branch information
pre-commit-ci[bot] and shcheklein authored Jul 6, 2024
1 parent 88c4b95 commit c9b7218
Show file tree
Hide file tree
Showing 7 changed files with 11 additions and 11 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.10'
rev: 'v0.5.0'
hooks:
- id: ruff
args: [--fix, --exit-non-zero-on-fix]
Expand Down
4 changes: 2 additions & 2 deletions dvc/daemon.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,10 +44,10 @@ def _win_detached_subprocess(args: Sequence[str], **kwargs) -> int:

startupinfo = STARTUPINFO()
startupinfo.dwFlags |= STARTF_USESHOWWINDOW
popen = subprocess.Popen(
popen = subprocess.Popen( # noqa: S603
args,
close_fds=True,
shell=False, # noqa: S603
shell=False,
startupinfo=startupinfo,
creationflags=creationflags,
**kwargs,
Expand Down
2 changes: 1 addition & 1 deletion dvc/repo/checkout.py
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ def onerror(target, exc):
(StageFileDoesNotExistError, StageFileBadNameError, NoOutputOrStageError),
):
raise CheckoutErrorSuggestGit(target) from exc
raise
raise # noqa: PLE0704

view = self.index.targets_view(
targets, recursive=recursive, with_deps=with_deps, onerror=onerror
Expand Down
4 changes: 2 additions & 2 deletions dvc/repo/experiments/collect.py
Original file line number Diff line number Diff line change
Expand Up @@ -69,11 +69,11 @@ def collect_rev(

def _collect_rev(
repo: "Repo",
rev: str,
revision: str,
param_deps: bool = False,
**kwargs,
) -> SerializableExp:
with repo.switch(rev) as rev:
with repo.switch(revision) as rev:
if rev == "workspace":
timestamp: Optional[datetime] = None
else:
Expand Down
2 changes: 1 addition & 1 deletion dvc/repo/index.py
Original file line number Diff line number Diff line change
Expand Up @@ -600,7 +600,7 @@ def collect_targets(
if not onerror:

def onerror(_target, _exc):
raise
raise # noqa: PLE0704

targets = ensure_list(targets)
if not targets:
Expand Down
4 changes: 2 additions & 2 deletions dvc/stage/run.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,8 @@ def _fish_supports_no_config(executable) -> bool:
bool: True if the fish version is greater than 3.3.0, False otherwise.
"""
try:
output = subprocess.check_output(
[executable, "--version"], # noqa: S603
output = subprocess.check_output( # noqa: S603
[executable, "--version"],
text=True,
)
version = Version(output.split(" ")[-1].strip())
Expand Down
4 changes: 2 additions & 2 deletions dvc/testing/fixtures.py
Original file line number Diff line number Diff line change
Expand Up @@ -228,10 +228,10 @@ def docker_services(tmp_path_factory, request):
pytest.skip("disabled for Windows on CI")

try:
subprocess.check_output(
subprocess.check_output( # noqa: S602
"docker ps", # noqa: S607
stderr=subprocess.STDOUT,
shell=True, # noqa: S602
shell=True,
)
except subprocess.CalledProcessError as err:
out = (err.output or b"").decode("utf-8")
Expand Down

0 comments on commit c9b7218

Please sign in to comment.