mirror of https://github.com/tqdm/tqdm.git
minor codacy fixes
This commit is contained in:
parent
b9507b31be
commit
f2f47d5f90
|
@ -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,
|
||||
|
|
|
@ -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
|
||||
|
||||
|
|
Loading…
Reference in New Issue