Fix python 3.6 escape char warnings in strings
In python 3.6, escape sequences that are not recognized in string literals issue DeprecationWarnings. Convert these to raw strings. Change-Id: I0e2bff9cb45974b159aed6a63913a63b1956aa32
This commit is contained in:
parent
1eea81171a
commit
d62d6e029d
@ -16,14 +16,14 @@ import tokenize
|
|||||||
from hacking import core
|
from hacking import core
|
||||||
|
|
||||||
|
|
||||||
FORMAT_RE = re.compile("%(?:"
|
FORMAT_RE = re.compile(r"%(?:"
|
||||||
"%|" # Ignore plain percents
|
r"%|" # Ignore plain percents
|
||||||
"(\(\w+\))?" # mapping key
|
r"(\(\w+\))?" # mapping key
|
||||||
"([#0 +-]?" # flag
|
r"([#0 +-]?" # flag
|
||||||
"(?:\d+|\*)?" # width
|
r"(?:\d+|\*)?" # width
|
||||||
"(?:\.\d+)?" # precision
|
r"(?:\.\d+)?" # precision
|
||||||
"[hlL]?" # length mod
|
r"[hlL]?" # length mod
|
||||||
"\w))") # type
|
r"\w))") # type
|
||||||
|
|
||||||
|
|
||||||
class LocalizationError(Exception):
|
class LocalizationError(Exception):
|
||||||
|
Loading…
x
Reference in New Issue
Block a user