Skip to content

Commit f25521b

Browse files
committed
chore(ruff) ruff v0.12.1 aggressive fixes
uv run ruff check --select ALL . --fix --unsafe-fixes --preview --show-fixes; uv run ruff format . Fixed 5 errors: - src/libvcs/_internal/run.py: 2 × COM812 (missing-trailing-comma) - src/libvcs/cmd/git.py: 3 × PLC1802 (len-test) Found 1057 errors (5 fixed, 1052 remaining). 1 file reformatted, 50 files left unchanged
1 parent 25bcd79 commit f25521b

File tree

2 files changed

+7
-5
lines changed

2 files changed

+7
-5
lines changed

src/libvcs/_internal/run.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -233,14 +233,16 @@ def progress_cb(output: t.AnyStr, timestamp: datetime.datetime) -> None:
233233

234234
if proc.stdout is not None:
235235
lines: t.Iterable[bytes] = filter(
236-
None, (line.strip() for line in proc.stdout.readlines())
236+
None,
237+
(line.strip() for line in proc.stdout.readlines()),
237238
)
238239
all_output = console_to_str(b"\n".join(lines))
239240
else:
240241
all_output = ""
241242
if code and proc.stderr is not None:
242243
stderr_lines: t.Iterable[bytes] = filter(
243-
None, (line.strip() for line in proc.stderr.readlines())
244+
None,
245+
(line.strip() for line in proc.stderr.readlines()),
244246
)
245247
all_output = console_to_str(b"".join(stderr_lines))
246248
output = "".join(all_output)

src/libvcs/cmd/git.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1282,7 +1282,7 @@ def reset(
12821282
pathspec = []
12831283

12841284
return self.run(
1285-
["reset", *local_flags, *(["--", *pathspec] if len(pathspec) else [])],
1285+
["reset", *local_flags, *(["--", *pathspec] if pathspec else [])],
12861286
check_returncode=check_returncode,
12871287
)
12881288

@@ -1419,7 +1419,7 @@ def checkout(
14191419
pathspec = []
14201420

14211421
return self.run(
1422-
["checkout", *local_flags, *(["--", *pathspec] if len(pathspec) else [])],
1422+
["checkout", *local_flags, *(["--", *pathspec] if pathspec else [])],
14231423
check_returncode=check_returncode,
14241424
)
14251425

@@ -1553,7 +1553,7 @@ def status(
15531553
pathspec = []
15541554

15551555
return self.run(
1556-
["status", *local_flags, *(["--", *pathspec] if len(pathspec) else [])],
1556+
["status", *local_flags, *(["--", *pathspec] if pathspec else [])],
15571557
check_returncode=check_returncode,
15581558
)
15591559

0 commit comments

Comments
 (0)