Skip to content

Commit b7dbb90

Browse files
Remove incorrect deprecation label for stdout and stderr (#8743)
Closes #8738.
1 parent 66794bc commit b7dbb90

File tree

2 files changed

+11
-11
lines changed

2 files changed

+11
-11
lines changed

crates/ruff_linter/src/rules/pyupgrade/rules/replace_stdout_stderr.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ impl Violation for ReplaceStdoutStderr {
4343

4444
#[derive_message_formats]
4545
fn message(&self) -> String {
46-
format!("Sending `stdout` and `stderr` to `PIPE` is deprecated, use `capture_output`")
46+
format!("Prefer `capture_output` over sending `stdout` and `stderr` to `PIPE`")
4747
}
4848

4949
fn fix_title(&self) -> Option<String> {

crates/ruff_linter/src/rules/pyupgrade/snapshots/ruff_linter__rules__pyupgrade__tests__UP022.py.snap

+10-10
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
source: crates/ruff_linter/src/rules/pyupgrade/mod.rs
33
---
4-
UP022.py:4:10: UP022 [*] Sending `stdout` and `stderr` to `PIPE` is deprecated, use `capture_output`
4+
UP022.py:4:10: UP022 [*] Prefer `capture_output` over sending `stdout` and `stderr` to `PIPE`
55
|
66
2 | import subprocess
77
3 |
@@ -22,7 +22,7 @@ UP022.py:4:10: UP022 [*] Sending `stdout` and `stderr` to `PIPE` is deprecated,
2222
6 6 | output = subprocess.run(["foo"], stdout=subprocess.PIPE, stderr=subprocess.PIPE)
2323
7 7 |
2424

25-
UP022.py:6:10: UP022 [*] Sending `stdout` and `stderr` to `PIPE` is deprecated, use `capture_output`
25+
UP022.py:6:10: UP022 [*] Prefer `capture_output` over sending `stdout` and `stderr` to `PIPE`
2626
|
2727
4 | output = run(["foo"], stdout=subprocess.PIPE, stderr=subprocess.PIPE)
2828
5 |
@@ -43,7 +43,7 @@ UP022.py:6:10: UP022 [*] Sending `stdout` and `stderr` to `PIPE` is deprecated,
4343
8 8 | output = subprocess.run(stdout=subprocess.PIPE, args=["foo"], stderr=subprocess.PIPE)
4444
9 9 |
4545

46-
UP022.py:8:10: UP022 [*] Sending `stdout` and `stderr` to `PIPE` is deprecated, use `capture_output`
46+
UP022.py:8:10: UP022 [*] Prefer `capture_output` over sending `stdout` and `stderr` to `PIPE`
4747
|
4848
6 | output = subprocess.run(["foo"], stdout=subprocess.PIPE, stderr=subprocess.PIPE)
4949
7 |
@@ -64,7 +64,7 @@ UP022.py:8:10: UP022 [*] Sending `stdout` and `stderr` to `PIPE` is deprecated,
6464
10 10 | output = subprocess.run(
6565
11 11 | ["foo"], stdout=subprocess.PIPE, check=True, stderr=subprocess.PIPE
6666

67-
UP022.py:10:10: UP022 [*] Sending `stdout` and `stderr` to `PIPE` is deprecated, use `capture_output`
67+
UP022.py:10:10: UP022 [*] Prefer `capture_output` over sending `stdout` and `stderr` to `PIPE`
6868
|
6969
8 | output = subprocess.run(stdout=subprocess.PIPE, args=["foo"], stderr=subprocess.PIPE)
7070
9 |
@@ -88,7 +88,7 @@ UP022.py:10:10: UP022 [*] Sending `stdout` and `stderr` to `PIPE` is deprecated,
8888
13 13 |
8989
14 14 | output = subprocess.run(
9090

91-
UP022.py:14:10: UP022 [*] Sending `stdout` and `stderr` to `PIPE` is deprecated, use `capture_output`
91+
UP022.py:14:10: UP022 [*] Prefer `capture_output` over sending `stdout` and `stderr` to `PIPE`
9292
|
9393
12 | )
9494
13 |
@@ -112,7 +112,7 @@ UP022.py:14:10: UP022 [*] Sending `stdout` and `stderr` to `PIPE` is deprecated,
112112
17 17 |
113113
18 18 | output = subprocess.run(
114114

115-
UP022.py:18:10: UP022 [*] Sending `stdout` and `stderr` to `PIPE` is deprecated, use `capture_output`
115+
UP022.py:18:10: UP022 [*] Prefer `capture_output` over sending `stdout` and `stderr` to `PIPE`
116116
|
117117
16 | )
118118
17 |
@@ -144,7 +144,7 @@ UP022.py:18:10: UP022 [*] Sending `stdout` and `stderr` to `PIPE` is deprecated,
144144
24 23 | encoding="utf-8",
145145
25 24 | close_fds=True,
146146

147-
UP022.py:29:14: UP022 [*] Sending `stdout` and `stderr` to `PIPE` is deprecated, use `capture_output`
147+
UP022.py:29:14: UP022 [*] Prefer `capture_output` over sending `stdout` and `stderr` to `PIPE`
148148
|
149149
28 | if output:
150150
29 | output = subprocess.run(
@@ -174,7 +174,7 @@ UP022.py:29:14: UP022 [*] Sending `stdout` and `stderr` to `PIPE` is deprecated,
174174
35 34 | encoding="utf-8",
175175
36 35 | )
176176

177-
UP022.py:38:10: UP022 Sending `stdout` and `stderr` to `PIPE` is deprecated, use `capture_output`
177+
UP022.py:38:10: UP022 Prefer `capture_output` over sending `stdout` and `stderr` to `PIPE`
178178
|
179179
36 | )
180180
37 |
@@ -188,7 +188,7 @@ UP022.py:38:10: UP022 Sending `stdout` and `stderr` to `PIPE` is deprecated, use
188188
|
189189
= help: Replace with `capture_output` keyword argument
190190

191-
UP022.py:42:10: UP022 Sending `stdout` and `stderr` to `PIPE` is deprecated, use `capture_output`
191+
UP022.py:42:10: UP022 Prefer `capture_output` over sending `stdout` and `stderr` to `PIPE`
192192
|
193193
40 | )
194194
41 |
@@ -202,7 +202,7 @@ UP022.py:42:10: UP022 Sending `stdout` and `stderr` to `PIPE` is deprecated, use
202202
|
203203
= help: Replace with `capture_output` keyword argument
204204

205-
UP022.py:46:10: UP022 Sending `stdout` and `stderr` to `PIPE` is deprecated, use `capture_output`
205+
UP022.py:46:10: UP022 Prefer `capture_output` over sending `stdout` and `stderr` to `PIPE`
206206
|
207207
44 | )
208208
45 |

0 commit comments

Comments
 (0)