Skip to content

Commit 8d2f64c

Browse files
authored
fix DeprecationWarning: invalid escape sequence '\s' for whitespace filter (#2560)
* fix `DeprecationWarning: invalid escape sequence '\s'` * add type hints * Revert "add type hints" This reverts commit 15d8abc.
1 parent 0bfb022 commit 8d2f64c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lm_eval/filters/extraction.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -164,7 +164,7 @@ def filter_ignores(st):
164164
fallback_regex = re.compile("|".join(fallback_regexes))
165165
without_paren_fallback_regex = "|".join(without_paren_fallback_regexes)
166166
without_paren_fallback_regex = re.compile(
167-
f":[\s]*({without_paren_fallback_regex})"
167+
rf":[\s]*({without_paren_fallback_regex})"
168168
)
169169

170170
filtered = []

0 commit comments

Comments
 (0)