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:
Eric Harney 2017-08-16 16:40:36 -04:00
parent 1eea81171a
commit d62d6e029d

View File

@ -16,14 +16,14 @@ import tokenize
from hacking import core
FORMAT_RE = re.compile("%(?:"
"%|" # Ignore plain percents
"(\(\w+\))?" # mapping key
"([#0 +-]?" # flag
"(?:\d+|\*)?" # width
"(?:\.\d+)?" # precision
"[hlL]?" # length mod
"\w))") # type
FORMAT_RE = re.compile(r"%(?:"
r"%|" # Ignore plain percents
r"(\(\w+\))?" # mapping key
r"([#0 +-]?" # flag
r"(?:\d+|\*)?" # width
r"(?:\.\d+)?" # precision
r"[hlL]?" # length mod
r"\w))") # type
class LocalizationError(Exception):