From f92260d297a08d869fa34f05d7ac271c0c155367 Mon Sep 17 00:00:00 2001 From: Dimitri Papadopoulos <3234522+DimitriPapadopoulos@users.noreply.github.com> Date: Fri, 21 Apr 2023 20:31:21 +0300 Subject: [PATCH] Fix new ruff error reported by CI S603 `subprocess` call: check for execution of untrusted input S607 Starting a process with a partial executable path --- codespell_lib/tests/test_basic.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/codespell_lib/tests/test_basic.py b/codespell_lib/tests/test_basic.py index 7a6e3317bd..89c6ed305c 100644 --- a/codespell_lib/tests/test_basic.py +++ b/codespell_lib/tests/test_basic.py @@ -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