-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
8e9bf84
commit cb8eea6
Showing
3 changed files
with
106 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
73 changes: 69 additions & 4 deletions
73
...snapshots/ruff_linter__rules__pylint__tests__PLW1510_subprocess_run_without_check.py.snap
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,22 +1,87 @@ | ||
--- | ||
source: crates/ruff_linter/src/rules/pylint/mod.rs | ||
--- | ||
subprocess_run_without_check.py:4:1: PLW1510 `subprocess.run` without explicit `check` argument | ||
subprocess_run_without_check.py:4:1: PLW1510 [*] `subprocess.run` without explicit `check` argument | ||
| | ||
3 | # Errors. | ||
4 | subprocess.run("ls") | ||
| ^^^^^^^^^^^^^^ PLW1510 | ||
5 | subprocess.run("ls", shell=True) | ||
6 | subprocess.run( | ||
| | ||
= help: Add explicit `check=False` | ||
|
||
subprocess_run_without_check.py:5:1: PLW1510 `subprocess.run` without explicit `check` argument | ||
ℹ Safe fix | ||
1 1 | import subprocess | ||
2 2 | | ||
3 3 | # Errors. | ||
4 |-subprocess.run("ls") | ||
4 |+subprocess.run("ls", check=False) | ||
5 5 | subprocess.run("ls", shell=True) | ||
6 6 | subprocess.run( | ||
7 7 | ["ls"], | ||
|
||
subprocess_run_without_check.py:5:1: PLW1510 [*] `subprocess.run` without explicit `check` argument | ||
| | ||
3 | # Errors. | ||
4 | subprocess.run("ls") | ||
5 | subprocess.run("ls", shell=True) | ||
| ^^^^^^^^^^^^^^ PLW1510 | ||
6 | | ||
7 | # Non-errors. | ||
6 | subprocess.run( | ||
7 | ["ls"], | ||
| | ||
= help: Add explicit `check=False` | ||
|
||
ℹ Safe fix | ||
2 2 | | ||
3 3 | # Errors. | ||
4 4 | subprocess.run("ls") | ||
5 |-subprocess.run("ls", shell=True) | ||
5 |+subprocess.run("ls", shell=True, check=False) | ||
6 6 | subprocess.run( | ||
7 7 | ["ls"], | ||
8 8 | shell=False, | ||
|
||
subprocess_run_without_check.py:6:1: PLW1510 [*] `subprocess.run` without explicit `check` argument | ||
| | ||
4 | subprocess.run("ls") | ||
5 | subprocess.run("ls", shell=True) | ||
6 | subprocess.run( | ||
| ^^^^^^^^^^^^^^ PLW1510 | ||
7 | ["ls"], | ||
8 | shell=False, | ||
| | ||
= help: Add explicit `check=False` | ||
|
||
ℹ Safe fix | ||
5 5 | subprocess.run("ls", shell=True) | ||
6 6 | subprocess.run( | ||
7 7 | ["ls"], | ||
8 |- shell=False, | ||
8 |+ shell=False, check=False, | ||
9 9 | ) | ||
10 10 | subprocess.run(["ls"], **kwargs) | ||
11 11 | | ||
|
||
subprocess_run_without_check.py:10:1: PLW1510 [*] `subprocess.run` without explicit `check` argument | ||
| | ||
8 | shell=False, | ||
9 | ) | ||
10 | subprocess.run(["ls"], **kwargs) | ||
| ^^^^^^^^^^^^^^ PLW1510 | ||
11 | | ||
12 | # Non-errors. | ||
| | ||
= help: Add explicit `check=False` | ||
|
||
ℹ Unsafe fix | ||
7 7 | ["ls"], | ||
8 8 | shell=False, | ||
9 9 | ) | ||
10 |-subprocess.run(["ls"], **kwargs) | ||
10 |+subprocess.run(["ls"], **kwargs, check=False) | ||
11 11 | | ||
12 12 | # Non-errors. | ||
13 13 | subprocess.run("ls", check=True) | ||
|
||
|