fix: flake8

This commit is contained in:
Markos Gogoulos
2024-11-20 13:27:57 +02:00
parent b8ee2e9fb8
commit 29b362c8ce
3 changed files with 2 additions and 40 deletions

View File

@@ -47,7 +47,7 @@ class Command(BaseCommand):
with open(file_path, 'w') as f:
f.write("translation_strings = {\n")
for key, value in translation_strings_wip.items():
f.write(f' "{key}": "{value}",\n')
f.write(f' "{key}": "{value}",\n') # noqa
f.write("}\n\n")
f.write("replacement_strings = {\n")

View File

@@ -386,7 +386,7 @@ def produce_sprite_from_video(friendly_token):
output_name = tmpdirname + "/sprites.jpg"
fps = getattr(settings, 'SPRITE_NUM_SECS', 10)
ffmpeg_cmd = [settings.FFMPEG_COMMAND, "-i", media.media_file.path, "-f", "image2", "-vf", f"fps=1/{fps}, scale=160:90", tmpdir_image_files]
ffmpeg_cmd = [settings.FFMPEG_COMMAND, "-i", media.media_file.path, "-f", "image2", "-vf", f"fps=1/{fps}, scale=160:90", tmpdir_image_files] # noqa
run_command(ffmpeg_cmd)
image_files = [f for f in os.listdir(tmpdirname) if f.startswith("img") and f.endswith(".jpg")]
image_files = sorted(image_files, key=lambda x: int(re.search(r'\d+', x).group()))