Skip to content

Commit

Permalink
Ignore strings which are started from an underscode-delimited word
Browse files Browse the repository at this point in the history
  • Loading branch information
insolor committed Oct 9, 2024
1 parent bd302b3 commit 505f425
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
2 changes: 1 addition & 1 deletion df_translation_toolkit/utils/df_ignore_string_rules.py
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ def ignore_gl(string: str) -> bool:

@rules.register
def ignore_underline_separated_words(string: str) -> bool:
return re.fullmatch(r"_*[A-Za-z\d]+_\w*", string) is not None
return re.fullmatch(r"_*[A-Za-z\d]+_.*", string) is not None


@rules.register
Expand Down
1 change: 1 addition & 0 deletions tests/test_df_ignore_string_rules.py
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,7 @@
(rules.ignore_underline_separated_words, "index1_11", True),
(rules.ignore_underline_separated_words, "_Thrd_id", True),
(rules.ignore_underline_separated_words, "_initterm_e", True),
(rules.ignore_underline_separated_words, "init_sound returned false!", True),
(rules.ignore_dash_prepended_strings, "-world_sites_and_pops", True),
(rules.ignore_dash_prepended_strings, "-site_map-", True),
(
Expand Down

0 comments on commit 505f425

Please sign in to comment.