Skip to content

Commit

Permalink
fix lint
Browse files Browse the repository at this point in the history
  • Loading branch information
zackees committed May 11, 2023
1 parent c65d24e commit 3d7ab31
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions src/video_subtitles/run.py
Original file line number Diff line number Diff line change
Expand Up @@ -53,8 +53,11 @@ def run( # pylint: disable=too-many-locals,too-many-branches,too-many-statement
from transcribe_anything.api import ( # pylint: disable=import-outside-toplevel
transcribe,
)

if file != file.strip():
raise RuntimeError(f"File {os.path.basename(file)} cannot contain spaces at the beginning or end")
raise RuntimeError(
f"File {os.path.basename(file)} cannot contain spaces at the beginning or end"
)

cache = DiskLRUCache(CACHE_FILE, 16)
file = os.path.abspath(file)
Expand Down Expand Up @@ -134,7 +137,7 @@ def do_translation(language: str = language):
for task in tasks:
try:
task()
except Exception as err:
except Exception as err: # pylint: disable=broad-except
traceback.print_exc()
exceptions.append(err)
else:
Expand Down

0 comments on commit 3d7ab31

Please sign in to comment.