Skip to content

Commit

Permalink
Fix new ruff error reported by CI
Browse files Browse the repository at this point in the history
S603 `subprocess` call: check for execution of untrusted input
S607 Starting a process with a partial executable path
  • Loading branch information
DimitriPapadopoulos committed Apr 22, 2023
1 parent 66ec667 commit f92260d
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion codespell_lib/tests/test_basic.py
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,10 @@ def run_codespell(
"""Run codespell."""
args = tuple(str(arg) for arg in args)
proc = subprocess.run(
["codespell", "--count", *args], cwd=cwd, capture_output=True, encoding="utf-8"
["codespell", "--count", *args], # noqa: S603, S607
cwd=cwd,
capture_output=True,
encoding="utf-8",
)
count = int(proc.stderr.split("\n")[-2])
return count
Expand Down

0 comments on commit f92260d

Please sign in to comment.