Fix python 3.6 escape char warnings in strings

3.6 is more strict about escape sequences in strings, causing
DeprecationWarnings for regex strings. This switches a few to raw
strings that were missed in I0e2bff9cb45974b159aed6a63913a63b1956aa32.

Change-Id: I7b2259a241ba2d4b9c7cbaec237c781d50bf2a6c
Signed-off-by: Sean McGinnis <sean.mcginnis@gmail.com>
This commit is contained in:
Sean McGinnis 2019-04-04 10:49:15 -05:00
parent 93cdb6f557
commit 5b2c87ea0c
No known key found for this signature in database
GPG Key ID: CE7EE4BFAF8D70C8
2 changed files with 4 additions and 4 deletions

View File

@ -16,8 +16,8 @@ import tokenize
from hacking import core
AUTHOR_TAG_RE = (re.compile("^\s*#\s*@?(a|A)uthors?:"),
re.compile("^\.\.\s+moduleauthor::"))
AUTHOR_TAG_RE = (re.compile(r"^\s*#\s*@?(a|A)uthors?:"),
re.compile(r"^\.\.\s+moduleauthor::"))
@core.flake8ext
@ -93,7 +93,7 @@ def hacking_has_correct_license(physical_line, filename, lines, line_number):
"License notice")
EMPTY_LINE_RE = re.compile("^\s*(#.*|$)")
EMPTY_LINE_RE = re.compile(r"^\s*(#.*|$)")
@core.flake8ext

View File

@ -14,7 +14,7 @@ import re
from hacking import core
RE_RELATIVE_IMPORT = re.compile('^from\s*[.]')
RE_RELATIVE_IMPORT = re.compile(r'^from\s*[.]')
@core.flake8ext