[TASK] Fix flake8 error that regex is not marked as regex

This commit is contained in:
Krukas 2019-11-01 09:58:25 +01:00
parent fd414aae45
commit e39479cb78

View file

@ -17,8 +17,8 @@ from watson.models import SearchEntry, has_int_pk
def regex_from_word(word):
"""Generates a regext from the given search word."""
return "(\s{word})|(^{word})".format(
"""Generates a regex from the given search word."""
return r"(\s{word})|(^{word})".format(
word=re.escape(word),
)