Fix pycodestyle complaints

Apparently, pycodestyle updated itself to now check for invalid escape
sequences, which only complain if the regex in use isn't a raw string
(r"").
This commit is contained in:
Daniel Quinn
2018-09-09 20:00:12 +01:00
parent 5c39fff51b
commit 5342db6ada
4 changed files with 6 additions and 5 deletions

View File

@@ -135,7 +135,7 @@ class MatchingModel(models.Model):
Example:
' some random words "with quotes " and spaces'
==>
["some", "random", "words", "with\s+quotes", "and", "spaces"]
["some", "random", "words", "with+quotes", "and", "spaces"]
"""
findterms = re.compile(r'"([^"]+)"|(\S+)').findall
normspace = re.compile(r"\s+").sub