Skip to content

Commit

Permalink
Fix for legacy exe: TypeError: 'type' object is not subscriptable
Browse files Browse the repository at this point in the history
Type annotation has been removed in some places
  • Loading branch information
rzc0d3r authored Jun 22, 2024
1 parent cb4f7e0 commit 2cf5167
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions modules/SRT.py
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ def init(self):
# init translator object
self.translator = GoogleTranslator(self.source_lang, self.target_lang)

def _translate_srt_batch(self, srt_batch: list[SRT_Block]):
def _translate_srt_batch(self, srt_batch): # srt_batch: list[SRT_Block]
text_batch = ''
for srt_block in srt_batch:
text_batch += srt_block.subtitle_text+'\n#\n'
Expand Down Expand Up @@ -120,4 +120,4 @@ def translate(self):
self.translated_srt_data.add_block(translated_srt_block)
close_translate_batch = True
progress.update(translate_task, advance=len(srt_batch))
return self.translated_srt_data
return self.translated_srt_data

0 comments on commit 2cf5167

Please sign in to comment.