From f2f47d5f90bcf6b908e165b40f4c8bfabcd1f149 Mon Sep 17 00:00:00 2001 From: Casper da Costa-Luis Date: Mon, 22 Feb 2021 22:25:17 +0000 Subject: [PATCH] minor codacy fixes --- examples/7zx.py | 4 ++-- tests/tests_main.py | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/examples/7zx.py b/examples/7zx.py index c5bc28b7..edc5c95a 100644 --- a/examples/7zx.py +++ b/examples/7zx.py @@ -77,11 +77,11 @@ def main(): unit="B", unit_scale=True) as tall: for fn, fcomp in zips.items(): md, sd = pty.openpty() - ex = subprocess.Popen( + ex = subprocess.Popen( # nosec cmd7zx + [fn], bufsize=1, stdout=md, # subprocess.PIPE, - stderr=subprocess.STDOUT) # nosec + stderr=subprocess.STDOUT) os.close(sd) with io.open(md, mode="rU", buffering=1) as m: with tqdm(total=sum(fcomp.values()), disable=len(zips) < 2, diff --git a/tests/tests_main.py b/tests/tests_main.py index aa477e5b..56453624 100644 --- a/tests/tests_main.py +++ b/tests/tests_main.py @@ -36,9 +36,9 @@ def test_pipes(): """Test command line pipes""" ls_out = subprocess.check_output(['ls']) # nosec ls = subprocess.Popen(['ls'], stdout=subprocess.PIPE) # nosec - res = subprocess.Popen( + res = subprocess.Popen( # nosec [sys.executable, '-c', 'from tqdm.cli import main; main()'], - stdin=ls.stdout, stdout=subprocess.PIPE, stderr=subprocess.PIPE) # nosec + stdin=ls.stdout, stdout=subprocess.PIPE, stderr=subprocess.PIPE) out, err = res.communicate() assert ls.poll() == 0