Escape raw strings

These were resulting in the below warning messages when running flake8
under Python 3.6.

    :48: DeprecationWarning: invalid escape sequence \[
    :143: DeprecationWarning: invalid escape sequence \-
    :250: DeprecationWarning: invalid escape sequence \s

Signed-off-by: Stephen Finucane <stephen@that.guru>
This commit is contained in:
Stephen Finucane 2018-06-20 09:34:16 +01:00
parent f61593b535
commit c0f42b6519
3 changed files with 3 additions and 3 deletions

View File

@ -140,7 +140,7 @@ class QtHelpBuilder(StandaloneHTMLBuilder):
else:
nspace = 'org.sphinx.%s.%s' % (outname, self.config.version)
nspace = re.sub('[^a-zA-Z0-9.\-]', '', nspace)
nspace = re.sub(r'[^a-zA-Z0-9.\-]', '', nspace)
nspace = re.sub(r'\.+', '.', nspace).strip('.')
nspace = nspace.lower()

View File

@ -45,7 +45,7 @@ locale.versionlabels = DeprecatedDict(
RemovedInSphinx30Warning
)
glob_re = re.compile('.*[*?\[].*')
glob_re = re.compile(r'.*[*?\[].*')
def int_or_nothing(argument):

View File

@ -247,7 +247,7 @@ class ExtBabel(Babel):
def get_mainlanguage_options(self):
# type: () -> unicode
"""Return options for polyglossia's ``\setmainlanguage``."""
"""Return options for polyglossia's ``\\setmainlanguage``."""
if self.use_polyglossia is False:
return None
elif self.language == 'german':