From b55002e0d2d45a2c5bc41f4700d058236e1016d9 Mon Sep 17 00:00:00 2001 From: Chao Cao <1504517223@qq.com> Date: Mon, 13 Jul 2026 15:54:39 -0400 Subject: [PATCH] Fix black formatting in europarl_st beam_search.py egs/europarl_st/SRT/lcma_srt/beam_search.py (added in #2096) fails the style_check workflow: black 22.3.0 wants to reformat it, which currently turns style_check red for every PR. Reformatted with the same black version CI uses. --- egs/europarl_st/SRT/lcma_srt/beam_search.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/egs/europarl_st/SRT/lcma_srt/beam_search.py b/egs/europarl_st/SRT/lcma_srt/beam_search.py index 7f12942793..c90bff9d83 100644 --- a/egs/europarl_st/SRT/lcma_srt/beam_search.py +++ b/egs/europarl_st/SRT/lcma_srt/beam_search.py @@ -1448,7 +1448,9 @@ def modified_beam_search( if lang_token_id is None: raise ValueError("force_first_lang=True but lang_token_id not provided") if not isinstance(lang_token_id, int): - raise TypeError("lang_token_id must be int (same target lang for entire batch).") + raise TypeError( + "lang_token_id must be int (same target lang for entire batch)." + ) packed_encoder_out = torch.nn.utils.rnn.pack_padded_sequence( input=encoder_out,