diff options
| author | Magnus Hagander | 2020-01-09 12:25:59 +0000 |
|---|---|---|
| committer | Magnus Hagander | 2020-01-09 12:25:59 +0000 |
| commit | e384b4c917e4a5c604baea975a9c69d38fe3dc4c (patch) | |
| tree | bc72c33c465ac92324f4df24b772738355a7c146 /tools | |
| parent | 69923c71906f24d6903800a8a6e8bd492eef4398 (diff) | |
Fix a number of incorrect escapes
Pointed out by newer versions of pep8, but they were never correct.
Diffstat (limited to 'tools')
| -rwxr-xr-x | tools/docs/docload.py | 2 | ||||
| -rwxr-xr-x | tools/ftp/spider_yum.py | 2 | ||||
| -rwxr-xr-x | tools/localhtmlvalidate/localhtmlvalidate.py | 2 |
3 files changed, 3 insertions, 3 deletions
diff --git a/tools/docs/docload.py b/tools/docs/docload.py index 094d9651..362da79b 100755 --- a/tools/docs/docload.py +++ b/tools/docs/docload.py @@ -23,7 +23,7 @@ pagecount = 0 quiet = False # regular expression used to search and extract the title on a given piece of # documentation, for further use in the application -re_titlematch = re.compile('<title\s*>([^<]+)</title\s*>', re.IGNORECASE) +re_titlematch = re.compile(r'<title\s*>([^<]+)</title\s*>', re.IGNORECASE) # regular expression used to find any images that are in the HTML and apply # additional bootstrap classes re_figure_match = re.compile('<div([^<>]+)class="figure"', re.IGNORECASE) diff --git a/tools/ftp/spider_yum.py b/tools/ftp/spider_yum.py index 4dfd6191..2dfa5431 100755 --- a/tools/ftp/spider_yum.py +++ b/tools/ftp/spider_yum.py @@ -8,7 +8,7 @@ import requests from collections import defaultdict from tempfile import NamedTemporaryFile -re_platformdir = re.compile('^(\w+)-(\d+)-([^-]+)$') +re_platformdir = re.compile(r'^(\w+)-(\d+)-([^-]+)$') if __name__ == "__main__": parser = argparse.ArgumentParser(description="Spider repo RPMs") diff --git a/tools/localhtmlvalidate/localhtmlvalidate.py b/tools/localhtmlvalidate/localhtmlvalidate.py index 4332350b..7160b52b 100755 --- a/tools/localhtmlvalidate/localhtmlvalidate.py +++ b/tools/localhtmlvalidate/localhtmlvalidate.py @@ -61,7 +61,7 @@ if __name__ == "__main__": print("Warnings: %s" % resp.headers['x-w3c-validator-warnings']) hp = html.parser.HTMLParser() for m in re.findall('<li class="msg_err">.*?</li>', resp.text, re.DOTALL): - r = re.search('<em>Line <a href="[^"]+">(\d+)</a>.*<span class="msg">(.*?)</span>', m, re.DOTALL) + r = re.search(r'<em>Line <a href="[^"]+">(\d+)</a>.*<span class="msg">(.*?)</span>', m, re.DOTALL) if r: print("Line %s (should be around %s): %s" % (r.group(1), int(r.group(1)) - firstline, hp.unescape(r.group(2)))) r2 = re.search('<code class="input">(.*?)<strong title=".*?">(.*?)</strong>(.*?)</code>', m, re.DOTALL) |
