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:
parent
93cdb6f557
commit
5b2c87ea0c
@ -16,8 +16,8 @@ import tokenize
|
|||||||
from hacking import core
|
from hacking import core
|
||||||
|
|
||||||
|
|
||||||
AUTHOR_TAG_RE = (re.compile("^\s*#\s*@?(a|A)uthors?:"),
|
AUTHOR_TAG_RE = (re.compile(r"^\s*#\s*@?(a|A)uthors?:"),
|
||||||
re.compile("^\.\.\s+moduleauthor::"))
|
re.compile(r"^\.\.\s+moduleauthor::"))
|
||||||
|
|
||||||
|
|
||||||
@core.flake8ext
|
@core.flake8ext
|
||||||
@ -93,7 +93,7 @@ def hacking_has_correct_license(physical_line, filename, lines, line_number):
|
|||||||
"License notice")
|
"License notice")
|
||||||
|
|
||||||
|
|
||||||
EMPTY_LINE_RE = re.compile("^\s*(#.*|$)")
|
EMPTY_LINE_RE = re.compile(r"^\s*(#.*|$)")
|
||||||
|
|
||||||
|
|
||||||
@core.flake8ext
|
@core.flake8ext
|
||||||
|
@ -14,7 +14,7 @@ import re
|
|||||||
|
|
||||||
from hacking import core
|
from hacking import core
|
||||||
|
|
||||||
RE_RELATIVE_IMPORT = re.compile('^from\s*[.]')
|
RE_RELATIVE_IMPORT = re.compile(r'^from\s*[.]')
|
||||||
|
|
||||||
|
|
||||||
@core.flake8ext
|
@core.flake8ext
|
||||||
|
Loading…
Reference in New Issue
Block a user