mirror of
https://github.com/coqui-ai/TTS.git
synced 2025-12-25 20:59:48 +01:00
linter fixes
This commit is contained in:
@@ -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)
|
||||
|
||||
|
||||
@@ -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))
|
||||
|
||||
Reference in New Issue
Block a user