TimeoutError is builtin, not exported from regex

This commit is contained in:
Trenton H
2026-03-31 08:02:58 -07:00
parent 1e1bba1a15
commit 1000c47d86

View File

@@ -68,7 +68,7 @@ def _extract_autocomplete_words(text_sources: list[str]) -> set[str]:
continue
try:
tokens = _WORD_RE.findall(text, timeout=_AUTOCOMPLETE_REGEX_TIMEOUT)
except regex.TimeoutError:
except TimeoutError:
logger.warning(
"Autocomplete word extraction timed out for a text source; skipping.",
)