subprocess-run-without-check (PLW1510)#
Derived from the Pylint linter.
What it does#
Checks for uses of subprocess.run
without an explicit check
argument.
Why is this bad?#
By default, subprocess.run
does not check the return code of the process
it runs. This can lead to silent failures.
Instead, consider using check=True
to raise an exception if the process
fails, or set check=False
explicitly to mark the behavior as intentional.
Example#
Use instead:
Or: