🎨 Run linter

This commit is contained in:
2024-05-17 11:26:45 +02:00
parent b26d99ef0e
commit 4fa347242b
6 changed files with 11 additions and 6 deletions

View File

@@ -39,7 +39,10 @@ class ScriptedVideoPipeline(BasePipeline):
def get_assets_concurrent(self, assets: list[dict[str, str]]) -> list[mp.VideoClip]: def get_assets_concurrent(self, assets: list[dict[str, str]]) -> list[mp.VideoClip]:
results = [] results = []
with ThreadPoolExecutor() as executor: with ThreadPoolExecutor() as executor:
futures = [executor.submit(self.get_asset, asset, i) for i, asset in enumerate(assets)] futures = [
executor.submit(self.get_asset, asset, i)
for i, asset in enumerate(assets)
]
for future in as_completed(futures): for future in as_completed(futures):
try: try:
results.append(future.result()) results.append(future.result())

View File

@@ -42,7 +42,9 @@ class GoogleStockImageEngine(BaseStockImageEngine):
custom_image_name="temp", custom_image_name="temp",
) )
# we find the file called temp. extension # we find the file called temp. extension
filename = [f for f in os.listdir(f"./temp{i}/") if f.startswith("temp.")][0] filename = [f for f in os.listdir(f"./temp{i}/") if f.startswith("temp.")][
0
]
img = mp.ImageClip(f"./temp{i}/{filename}") img = mp.ImageClip(f"./temp{i}/{filename}")
# delete the temp folder # delete the temp folder
except Exception as e: except Exception as e: