Skip to content

Commit 7099eea

Browse files
build(deps-dev): bump ruff from 0.15.22 to 0.16.0 (#64)
* build(deps-dev): bump ruff from 0.15.22 to 0.16.0 Bumps [ruff](https://github.com/astral-sh/ruff) from 0.15.22 to 0.16.0. - [Release notes](https://github.com/astral-sh/ruff/releases) - [Changelog](https://github.com/astral-sh/ruff/blob/main/CHANGELOG.md) - [Commits](astral-sh/ruff@0.15.22...0.16.0) --- updated-dependencies: - dependency-name: ruff dependency-version: 0.16.0 dependency-type: direct:development update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <support@github.com> * refactor: replace `Optional` with `| None`, update `subprocess.run` calls with `check=False` for robustness --------- Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Helber Belmiro <helber.belmiro@gmail.com>
1 parent 170b31a commit 7099eea

3 files changed

Lines changed: 27 additions & 29 deletions

File tree

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ requires-python = ">=3.14"
77

88
[dependency-groups]
99
lint = [
10-
"ruff==0.15.22",
10+
"ruff==0.16.0",
1111
"ty==0.0.63",
1212
]
1313
test = [

uv.lock

Lines changed: 22 additions & 22 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

verify.py

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,9 @@
1-
#!/usr/bin/env python3
21
from __future__ import annotations
32

43
import argparse
54
import os
65
import shlex
76
import subprocess
8-
from typing import Optional
97

108

119
def _positive_int(value: str) -> int:
@@ -16,7 +14,7 @@ def _positive_int(value: str) -> int:
1614
return n
1715

1816

19-
def _parse_args(argv: Optional[list[str]] = None) -> argparse.Namespace:
17+
def _parse_args(argv: list[str] | None = None) -> argparse.Namespace:
2018
parser = argparse.ArgumentParser(
2119
description="Verify that lock/requirements files are in sync.",
2220
)
@@ -84,15 +82,15 @@ def _resolve_directory_in_command(command: str, repo_root: str) -> str:
8482
return shlex.join(args) if modified else command
8583

8684

87-
def main(argv: Optional[list[str]] = None) -> int:
85+
def main(argv: list[str] | None = None) -> int:
8886
args = _parse_args(argv)
8987
command = _resolve_directory_in_command(args.command, _get_repo_root())
9088

9189
print(f"Resolved COMMAND: {command}")
9290
print(f"Running command: {command}")
9391

9492
try:
95-
result = subprocess.run(shlex.split(command))
93+
result = subprocess.run(shlex.split(command), check=False)
9694
if result.returncode != 0:
9795
return 1
9896
except ValueError:
@@ -102,7 +100,7 @@ def main(argv: Optional[list[str]] = None) -> int:
102100
print(f"❌ Command not found: {command}")
103101
return 1
104102

105-
diff = subprocess.run(["git", "diff", "--exit-code", "--quiet"])
103+
diff = subprocess.run(["git", "diff", "--exit-code", "--quiet"], check=False)
106104
if diff.returncode != 0:
107105
try:
108106
names = subprocess.run(

0 commit comments

Comments
 (0)