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) my_env["PYTHON_EGG_CACHE"] = "/tmp/tmp{}".format(i)
command[-1] = "--rank={}".format(i) command[-1] = "--rank={}".format(i)
stdout = None if i == 0 else open(os.devnull, "w") 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) processes.append(p)
print(command) print(command)

View File

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