Skip to content

Commit

Permalink
Fix invalid syntax deprecation warning in regex
Browse files Browse the repository at this point in the history
Solve `DeprecationWarning: invalid escape sequence '\%'`
  • Loading branch information
amureki authored and syphar committed Nov 5, 2021
1 parent 293e454 commit e1f3314
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pytest_translations/po_spelling.py
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ def runtest(self):
# 1. replace everything between curly braces
text = re.sub('{.*?}', '', text)
# 2. remove everything between %( and )
text = re.sub('\%\(.*?\)', '', text)
text = re.sub(r'\%\(.*?\)', '', text)
# 3. remove ­ html entity
text = text.replace('­', '')

Expand Down

0 comments on commit e1f3314

Please sign in to comment.