[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 committed by Guillaume Baffoin
parent 75980f8406
commit ced9b0a592
1 changed files with 2 additions and 2 deletions

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),
)