summaryrefslogtreecommitdiff
path: root/pylint/epylint.py
diff options
context:
space:
mode:
authorNick Drozd <nicholasdrozd@gmail.com>2021-08-18 20:23:05 -0500
committerPierre Sassoulas <pierre.sassoulas@gmail.com>2021-08-20 19:27:50 +0200
commit071ce3ccd28d5250cdcb2a5079cd85727a8af051 (patch)
tree0799d3daa68158675ec2d1b86633c8c5cce0bd5d /pylint/epylint.py
parent2d05a4e91fc3d95b6f80f277be6506cbe95c895f (diff)
downloadpylint-git-071ce3ccd28d5250cdcb2a5079cd85727a8af051.tar.gz
Change some if/assign blocks to if-expressions
Diffstat (limited to 'pylint/epylint.py')
-rwxr-xr-xpylint/epylint.py10
1 files changed, 2 insertions, 8 deletions
diff --git a/pylint/epylint.py b/pylint/epylint.py
index 3b0462220..76a2f2b3d 100755
--- a/pylint/epylint.py
+++ b/pylint/epylint.py
@@ -164,15 +164,9 @@ def py_run(command_options="", return_std=False, stdout=None, stderr=None):
# Providing standard output and/or error if not set
if stdout is None:
- if return_std:
- stdout = PIPE
- else:
- stdout = sys.stdout
+ stdout = PIPE if return_std else sys.stdout
if stderr is None:
- if return_std:
- stderr = PIPE
- else:
- stderr = sys.stderr
+ stderr = PIPE if return_std else sys.stderr
# Call pylint in a subprocess
with Popen(
cli,