Merge ~cjwatson/ubuntu-archive-tools:flake8-W605 into ubuntu-archive-tools:main

Proposed by Colin Watson
Status: Needs review
Proposed branch: ~cjwatson/ubuntu-archive-tools:flake8-W605
Merge into: ubuntu-archive-tools:main
Diff against target: 99 lines (+17/-17)
4 files modified
kernel_workflow.py (+1/-1)
publish-image-set (+9/-9)
queuediff (+4/-4)
sru-review (+3/-3)
Reviewer Review Type Date Requested Status
Ubuntu Package Archive Administrators Pending
Review via email: mp+411081@code.launchpad.net

Commit message

Fix "W605 invalid escape sequence" flake8 warnings

To post a comment you must log in.

Unmerged commits

0dbb075... by Colin Watson

Fix "W605 invalid escape sequence" flake8 warnings

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1diff --git a/kernel_workflow.py b/kernel_workflow.py
2index a211776..8f5a8f8 100644
3--- a/kernel_workflow.py
4+++ b/kernel_workflow.py
5@@ -46,7 +46,7 @@ def process_sru_bug(lp, bugnum, task_callback, source_callback, context=None):
6 """
7 package_re = re.compile(
8 (r'^%subuntu/(?P<release>[0-9a-z.-]+)/'
9- + '\+source/(?P<package>[a-z0-9.-]+)$') % str(lp._root_uri))
10+ r'\+source/(?P<package>[a-z0-9.-]+)$') % str(lp._root_uri))
11 workflow_re = re.compile(
12 r'^%skernel-sru-workflow/(?P<subtask>.*)' % str(lp._root_uri))
13 prep_re = re.compile(r'prepare-package(?P<subpackage>.*)')
14diff --git a/publish-image-set b/publish-image-set
15index e9669c3..4f1c3bc 100755
16--- a/publish-image-set
17+++ b/publish-image-set
18@@ -40,21 +40,21 @@ import sys
19 # See isotracker.py for setup instructions.
20 from isotracker import ISOTracker
21
22-milestone_name_re = re.compile('(Alpha|Beta|RC|Final|Pre-release)(?: (\d))?')
23-stable_name_re = re.compile('(Xenial|Bionic|Focal) (16|18|20)\.04\.\d+')
24+milestone_name_re = re.compile(r'(Alpha|Beta|RC|Final|Pre-release)(?: (\d))?')
25+stable_name_re = re.compile(r'(Xenial|Bionic|Focal) (16|18|20)\.04\.\d+')
26
27 # do not warn about not being able to handle those
28 ignore_product_re = re.compile(
29 'Netboot |Upgrade |Server EC2|Server Windows Azure|line-through|Ubuntu WSL')
30 # this identifies known builds
31 product_re = re.compile(
32- '((?:|u|lu|ku|edu|xu|myth)buntu(?: studio|kylin| kylin| gnome| mate| budgie| next)?) '
33- '(alternate|desktop|dvd|server(?: subiquity)?|mobile|base|active|wubi)(?: preinstalled)? '
34- '(i386|amd64$|amd64\+mac|armel$|armel\+dove|armel\+omap$|armel\+omap4|'
35- 'armel\+ac100|armel\+mx5|armhf$|armhf\+omap$|armhf\+omap4|armhf\+ac100|'
36- 'armhf\+mx5|armhf\+nexus7|armhf\+raspi$|armhf\+raspi2|armhf\+raspi3|'
37- 'arm64$|arm64\+raspi$|arm64\+raspi3|powerpc|ppc64el|s390x|riscv64$|'
38- 'riscv64\+unleashed|riscv64\+unmatched)', re.I)
39+ r'((?:|u|lu|ku|edu|xu|myth)buntu(?: studio|kylin| kylin| gnome| mate| budgie| next)?) '
40+ r'(alternate|desktop|dvd|server(?: subiquity)?|mobile|base|active|wubi)(?: preinstalled)? '
41+ r'(i386|amd64$|amd64\+mac|armel$|armel\+dove|armel\+omap$|armel\+omap4|'
42+ r'armel\+ac100|armel\+mx5|armhf$|armhf\+omap$|armhf\+omap4|armhf\+ac100|'
43+ r'armhf\+mx5|armhf\+nexus7|armhf\+raspi$|armhf\+raspi2|armhf\+raspi3|'
44+ r'arm64$|arm64\+raspi$|arm64\+raspi3|powerpc|ppc64el|s390x|riscv64$|'
45+ r'riscv64\+unleashed|riscv64\+unmatched)', re.I)
46
47 # map an image type from the ISO tracker to a source directory for
48 # publish-release
49diff --git a/queuediff b/queuediff
50index 5719464..cc7c731 100755
51--- a/queuediff
52+++ b/queuediff
53@@ -98,11 +98,11 @@ def from_queue(sourcepkg, release):
54 '''
55 oops_re = re.compile('class="oopsid">(OOPS[a-zA-Z0-9-]+)<')
56 changes_re = re.compile(
57- 'href="(http://launchpadlibrarian.net/\d+/%s_[^"]+_source.changes)"' %
58+ r'href="(http://launchpadlibrarian.net/\d+/%s_[^"]+_source.changes)"' %
59 re.escape(quote(sourcepkg)))
60 debdiff_re = re.compile(
61- 'href="(http://launchpadlibrarian.net/'
62- '\d+/%s_[^"_]+_[^_"]+\.diff\.gz)">\s*diff from' %
63+ r'href="(http://launchpadlibrarian.net/'
64+ r'\d+/%s_[^"_]+_[^_"]+\.diff\.gz)">\s*diff from' %
65 re.escape(quote(sourcepkg)))
66
67 queue_html = urlopen(queue_url % release).read()
68@@ -141,7 +141,7 @@ def from_ppa(sourcepkg, release, user, ppaname):
69 'href="(https://launchpad.net/[^ "]+/%s_[^"]+_source.changes)"' %
70 re.escape(quote(sourcepkg)))
71 sourcepub_re = re.compile(
72- 'href="(\+sourcepub/\d+/\+listing-archive-extra)"')
73+ r'href="(\+sourcepub/\d+/\+listing-archive-extra)"')
74 #debdiff_re = re.compile(
75 # 'href="(https://launchpad.net/.[^ "]+.diff.gz)">diff from')
76
77diff --git a/sru-review b/sru-review
78index 0f55d5d..2682727 100755
79--- a/sru-review
80+++ b/sru-review
81@@ -217,8 +217,8 @@ def from_queue(options, archive, sourcepkg, series, version=None):
82 else:
83 re_version = '[^_"]+'
84 debdiff_re = re.compile(
85- 'href="(http://launchpadlibrarian.net/'
86- '\d+/%s_[^"_]+_%s\.diff\.gz)">\s*diff from' %
87+ r'href="(http://launchpadlibrarian.net/'
88+ r'\d+/%s_[^"_]+_%s\.diff\.gz)">\s*diff from' %
89 (re.escape(sourcepkg), re_version))
90
91 queue_html = urlopen(queue_url).read().decode('utf-8')
92@@ -250,7 +250,7 @@ def from_ppa(options, sourcepkg, user, ppaname):
93 'href="(https://launchpad.net/[^ "]+/%s_[^"]+_source.changes)"' %
94 re.escape(sourcepkg))
95 sourcepub_re = re.compile(
96- 'href="(\+sourcepub/\d+/\+listing-archive-extra)"')
97+ r'href="(\+sourcepub/\d+/\+listing-archive-extra)"')
98 #debdiff_re = re.compile(
99 # 'href="(https://launchpad.net/.[^ "]+.diff.gz)">diff from')
100

Subscribers

People subscribed via source and target branches