Remove incorrect deprecation label for stdout and stderr (#8743)

Closes https://github.com/astral-sh/ruff/issues/8738.
This commit is contained in:
Charlie Marsh 2023-11-17 09:34:02 -08:00 committed by GitHub
parent 66794bc9fe
commit b7dbb9062c
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 11 additions and 11 deletions

View file

@ -43,7 +43,7 @@ impl Violation for ReplaceStdoutStderr {
#[derive_message_formats] #[derive_message_formats]
fn message(&self) -> String { fn message(&self) -> String {
format!("Sending `stdout` and `stderr` to `PIPE` is deprecated, use `capture_output`") format!("Prefer `capture_output` over sending `stdout` and `stderr` to `PIPE`")
} }
fn fix_title(&self) -> Option<String> { fn fix_title(&self) -> Option<String> {

View file

@ -1,7 +1,7 @@
--- ---
source: crates/ruff_linter/src/rules/pyupgrade/mod.rs source: crates/ruff_linter/src/rules/pyupgrade/mod.rs
--- ---
UP022.py:4:10: UP022 [*] Sending `stdout` and `stderr` to `PIPE` is deprecated, use `capture_output` UP022.py:4:10: UP022 [*] Prefer `capture_output` over sending `stdout` and `stderr` to `PIPE`
| |
2 | import subprocess 2 | import subprocess
3 | 3 |
@ -22,7 +22,7 @@ UP022.py:4:10: UP022 [*] Sending `stdout` and `stderr` to `PIPE` is deprecated,
6 6 | output = subprocess.run(["foo"], stdout=subprocess.PIPE, stderr=subprocess.PIPE) 6 6 | output = subprocess.run(["foo"], stdout=subprocess.PIPE, stderr=subprocess.PIPE)
7 7 | 7 7 |
UP022.py:6:10: UP022 [*] Sending `stdout` and `stderr` to `PIPE` is deprecated, use `capture_output` UP022.py:6:10: UP022 [*] Prefer `capture_output` over sending `stdout` and `stderr` to `PIPE`
| |
4 | output = run(["foo"], stdout=subprocess.PIPE, stderr=subprocess.PIPE) 4 | output = run(["foo"], stdout=subprocess.PIPE, stderr=subprocess.PIPE)
5 | 5 |
@ -43,7 +43,7 @@ UP022.py:6:10: UP022 [*] Sending `stdout` and `stderr` to `PIPE` is deprecated,
8 8 | output = subprocess.run(stdout=subprocess.PIPE, args=["foo"], stderr=subprocess.PIPE) 8 8 | output = subprocess.run(stdout=subprocess.PIPE, args=["foo"], stderr=subprocess.PIPE)
9 9 | 9 9 |
UP022.py:8:10: UP022 [*] Sending `stdout` and `stderr` to `PIPE` is deprecated, use `capture_output` UP022.py:8:10: UP022 [*] Prefer `capture_output` over sending `stdout` and `stderr` to `PIPE`
| |
6 | output = subprocess.run(["foo"], stdout=subprocess.PIPE, stderr=subprocess.PIPE) 6 | output = subprocess.run(["foo"], stdout=subprocess.PIPE, stderr=subprocess.PIPE)
7 | 7 |
@ -64,7 +64,7 @@ UP022.py:8:10: UP022 [*] Sending `stdout` and `stderr` to `PIPE` is deprecated,
10 10 | output = subprocess.run( 10 10 | output = subprocess.run(
11 11 | ["foo"], stdout=subprocess.PIPE, check=True, stderr=subprocess.PIPE 11 11 | ["foo"], stdout=subprocess.PIPE, check=True, stderr=subprocess.PIPE
UP022.py:10:10: UP022 [*] Sending `stdout` and `stderr` to `PIPE` is deprecated, use `capture_output` UP022.py:10:10: UP022 [*] Prefer `capture_output` over sending `stdout` and `stderr` to `PIPE`
| |
8 | output = subprocess.run(stdout=subprocess.PIPE, args=["foo"], stderr=subprocess.PIPE) 8 | output = subprocess.run(stdout=subprocess.PIPE, args=["foo"], stderr=subprocess.PIPE)
9 | 9 |
@ -88,7 +88,7 @@ UP022.py:10:10: UP022 [*] Sending `stdout` and `stderr` to `PIPE` is deprecated,
13 13 | 13 13 |
14 14 | output = subprocess.run( 14 14 | output = subprocess.run(
UP022.py:14:10: UP022 [*] Sending `stdout` and `stderr` to `PIPE` is deprecated, use `capture_output` UP022.py:14:10: UP022 [*] Prefer `capture_output` over sending `stdout` and `stderr` to `PIPE`
| |
12 | ) 12 | )
13 | 13 |
@ -112,7 +112,7 @@ UP022.py:14:10: UP022 [*] Sending `stdout` and `stderr` to `PIPE` is deprecated,
17 17 | 17 17 |
18 18 | output = subprocess.run( 18 18 | output = subprocess.run(
UP022.py:18:10: UP022 [*] Sending `stdout` and `stderr` to `PIPE` is deprecated, use `capture_output` UP022.py:18:10: UP022 [*] Prefer `capture_output` over sending `stdout` and `stderr` to `PIPE`
| |
16 | ) 16 | )
17 | 17 |
@ -144,7 +144,7 @@ UP022.py:18:10: UP022 [*] Sending `stdout` and `stderr` to `PIPE` is deprecated,
24 23 | encoding="utf-8", 24 23 | encoding="utf-8",
25 24 | close_fds=True, 25 24 | close_fds=True,
UP022.py:29:14: UP022 [*] Sending `stdout` and `stderr` to `PIPE` is deprecated, use `capture_output` UP022.py:29:14: UP022 [*] Prefer `capture_output` over sending `stdout` and `stderr` to `PIPE`
| |
28 | if output: 28 | if output:
29 | output = subprocess.run( 29 | output = subprocess.run(
@ -174,7 +174,7 @@ UP022.py:29:14: UP022 [*] Sending `stdout` and `stderr` to `PIPE` is deprecated,
35 34 | encoding="utf-8", 35 34 | encoding="utf-8",
36 35 | ) 36 35 | )
UP022.py:38:10: UP022 Sending `stdout` and `stderr` to `PIPE` is deprecated, use `capture_output` UP022.py:38:10: UP022 Prefer `capture_output` over sending `stdout` and `stderr` to `PIPE`
| |
36 | ) 36 | )
37 | 37 |
@ -188,7 +188,7 @@ UP022.py:38:10: UP022 Sending `stdout` and `stderr` to `PIPE` is deprecated, use
| |
= help: Replace with `capture_output` keyword argument = help: Replace with `capture_output` keyword argument
UP022.py:42:10: UP022 Sending `stdout` and `stderr` to `PIPE` is deprecated, use `capture_output` UP022.py:42:10: UP022 Prefer `capture_output` over sending `stdout` and `stderr` to `PIPE`
| |
40 | ) 40 | )
41 | 41 |
@ -202,7 +202,7 @@ UP022.py:42:10: UP022 Sending `stdout` and `stderr` to `PIPE` is deprecated, use
| |
= help: Replace with `capture_output` keyword argument = help: Replace with `capture_output` keyword argument
UP022.py:46:10: UP022 Sending `stdout` and `stderr` to `PIPE` is deprecated, use `capture_output` UP022.py:46:10: UP022 Prefer `capture_output` over sending `stdout` and `stderr` to `PIPE`
| |
44 | ) 44 | )
45 | 45 |