Skip to content

Commit 84aed85

Browse files
Apply ruff/pyupgrade rule UP022
UP022 Prefer `capture_output` over sending `stdout` and `stderr` to `PIPE`
1 parent 6736cc1 commit 84aed85

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

tests/test_sourcecode.py

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,7 @@ def test_flake8(self):
2626
subprocess.run(
2727
[sys.executable, '-m', 'flake8', '--config', config_path],
2828
check=True,
29-
stdout=subprocess.PIPE,
30-
stderr=subprocess.PIPE,
29+
capture_output=True,
3130
cwd=os.path.join(edgepath, subdir))
3231
except subprocess.CalledProcessError as ex:
3332
output = ex.stdout.decode()
@@ -59,8 +58,7 @@ def test_mypy(self):
5958
'uvloop'
6059
],
6160
check=True,
62-
stdout=subprocess.PIPE,
63-
stderr=subprocess.PIPE,
61+
capture_output=True,
6462
cwd=edgepath
6563
)
6664
except subprocess.CalledProcessError as ex:

0 commit comments

Comments
 (0)