Skip to content

Commit 2e1adb2

Browse files
rparolinclaude
andcommitted
toolshed: silence S607 on clean.py's git invocations
The bandit workflow (ruff --select S) and pre-commit.ci both failed on toolshed/clean.py: S607, starting a process with a partial executable path. Annotate the two `git` argv lists the way the rest of the repo already does -- see toolshed/check_spdx.py and toolshed/check_precommit_installed.py, which carry the same noqa for the same reason. Verified with the exact command the workflow runs: `ruff check --select S --ignore S101,S311,S404 .` -> all checks passed, and `pre-commit run --all-files` is clean. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
1 parent ebbe55c commit 2e1adb2

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

‎toolshed/clean.py‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@
7272
def repo_root() -> Path:
7373
"""Return the top level of the worktree containing this script."""
7474
out = subprocess.run(
75-
["git", "rev-parse", "--show-toplevel"],
75+
["git", "rev-parse", "--show-toplevel"], # noqa: S607
7676
cwd=Path(__file__).resolve().parent,
7777
capture_output=True,
7878
check=True,
@@ -101,7 +101,7 @@ def ignored_paths(root: Path) -> list[str]:
101101
the outermost path of each artifact tree.
102102
"""
103103
out = subprocess.run(
104-
["git", "status", "--porcelain", "-z", "--ignored"],
104+
["git", "status", "--porcelain", "-z", "--ignored"], # noqa: S607
105105
cwd=root,
106106
capture_output=True,
107107
check=True,

0 commit comments

Comments
 (0)