Skip to content

Commit

Permalink
Update new_lists.py
Browse files Browse the repository at this point in the history
  • Loading branch information
Nora-Olivia-Ammann committed Apr 26, 2024
1 parent 6ca883a commit 26e29a4
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/dsp_tools/commands/excel2json/new_lists.py
Expand Up @@ -154,7 +154,7 @@ def _get_all_languages_for_columns(columns: pd.Index[str], ending: str) -> set[s
return set(res for x in columns if (res := _get_lang_string_from_column_names(x, ending)))


def _get_preferred_language(columns: pd.Index[str], ending: str) -> str:
def _get_preferred_language(columns: pd.Index[str], ending: str = r"(\d+|list)") -> str:
match = [res.group(1) for x in columns if (res := regex.search(rf"^(en|de|fr|it|rm)_{ending}+$", x))]
if "en" in match:
return "en"
Expand Down

0 comments on commit 26e29a4

Please sign in to comment.