linter fixes

This commit is contained in:
Eren Gölge 2021-06-01 09:15:32 +02:00
parent 406c4d0577
commit d0ab0382fc
2 changed files with 3 additions and 3 deletions

View File

@ -51,7 +51,7 @@ def main():
my_env["PYTHON_EGG_CACHE"] = "/tmp/tmp{}".format(i)
command[-1] = "--rank={}".format(i)
stdout = None if i == 0 else open(os.devnull, "w")
p = subprocess.Popen(["python3"] + command, stdout=stdout, env=my_env)
p = subprocess.Popen(["python3"] + command, stdout=stdout, env=my_env) # pylint: disable=consider-using-with
processes.append(p)
print(command)

View File

@ -149,8 +149,8 @@ class ModelManager(object):
def _download_zip_file(file_url, output):
"""Download the github releases"""
r = requests.get(file_url)
z = zipfile.ZipFile(io.BytesIO(r.content))
z.extractall(output)
with zipfile.ZipFile(io.BytesIO(r.content)) as z:
z.extractall(output)
for file_path in z.namelist()[1:]:
src_path = os.path.join(output, file_path)
dst_path = os.path.join(output, os.path.basename(file_path))