Merge ~cjwatson/launchpad:flake8-line-length into launchpad:master
- Git
- lp:~cjwatson/launchpad
- flake8-line-length
- Merge into master
Proposed by
Colin Watson
Status: | Merged |
---|---|
Approved by: | Colin Watson |
Approved revision: | 98d05f79d5525bd68170a061f2f8686dfd9a7860 |
Merge reported by: | Otto Co-Pilot |
Merged at revision: | not available |
Proposed branch: | ~cjwatson/launchpad:flake8-line-length |
Merge into: | launchpad:master |
Diff against target: |
712 lines (+187/-159) 25 files modified
doc/conf.py (+12/-9) lib/lp/app/validators/email.py (+1/-0) lib/lp/app/validators/tests/test_validation.py (+2/-1) lib/lp/app/widgets/date.py (+2/-0) lib/lp/archivepublisher/customupload.py (+3/-1) lib/lp/archivepublisher/tests/test_signing.py (+2/-1) lib/lp/archiveuploader/tests/test_tagfiles.py (+5/-5) lib/lp/code/mail/tests/test_codehandler.py (+2/-1) lib/lp/code/mail/tests/test_codeimport.py (+2/-1) lib/lp/code/model/tests/test_branch.py (+4/-3) lib/lp/oci/tests/test_ocirecipe.py (+2/-2) lib/lp/registry/model/distributionsourcepackage.py (+2/-1) lib/lp/registry/tests/test_prf_walker.py (+2/-2) lib/lp/services/librarianserver/testing/server.py (+23/-14) lib/lp/soyuz/browser/archivesubscription.py (+2/-1) lib/lp/soyuz/browser/tests/test_distroarchseries_webservice.py (+2/-1) lib/lp/soyuz/mail/tests/test_packageupload.py (+1/-1) lib/lp/testing/keyserver/tests/test_web.py (+1/-1) lib/lp/translations/scripts/tests/test_packaging_translations.py (+2/-2) lib/lp/translations/utilities/gettext_po_parser.py (+1/-1) lib/lp/translations/utilities/tests/test_gettext_po_exporter.py (+1/-1) lib/lp/translations/utilities/tests/test_xpi_po_exporter.py (+2/-2) scripts/update-stacked-on.py (+2/-1) test_on_merge.py (+2/-1) utilities/community-contributions.py (+107/-106) |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Cristian Gonzalez (community) | Approve | ||
Review via email: mp+406337@code.launchpad.net |
Commit message
Fix/ignore flake8 line length errors
Description of the change
To post a comment you must log in.
Preview Diff
[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1 | diff --git a/doc/conf.py b/doc/conf.py |
2 | index 212dd6b..c4a73e4 100644 |
3 | --- a/doc/conf.py |
4 | +++ b/doc/conf.py |
5 | @@ -3,7 +3,8 @@ |
6 | # Launchpad documentation build configuration file, created by |
7 | # sphinx-quickstart on Thu Feb 3 16:06:09 2011. |
8 | # |
9 | -# This file is execfile()d with the current directory set to its containing dir. |
10 | +# This file is execfile()d with the current directory set to its containing |
11 | +# dir. |
12 | # |
13 | # Note that not all possible configuration values are present in this |
14 | # autogenerated file. |
15 | @@ -16,13 +17,13 @@ |
16 | # documentation root, use os.path.abspath to make it absolute, like shown here. |
17 | #sys.path.insert(0, os.path.abspath('.')) |
18 | |
19 | -# -- General configuration ----------------------------------------------------- |
20 | +# -- General configuration ---------------------------------------------------- |
21 | |
22 | # If your documentation needs a minimal Sphinx version, state it here. |
23 | #needs_sphinx = '1.0' |
24 | |
25 | -# Add any Sphinx extension module names here, as strings. They can be extensions |
26 | -# coming with Sphinx (named 'sphinx.ext.*') or your custom ones. |
27 | +# Add any Sphinx extension module names here, as strings. They can be |
28 | +# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom ones. |
29 | extensions = ['sphinx.ext.autodoc', 'sphinx.ext.doctest', 'sphinx.ext.todo'] |
30 | |
31 | # Add any paths that contain templates here, relative to this directory. |
32 | @@ -64,7 +65,8 @@ release = 'dev' |
33 | # directories to ignore when looking for source files. |
34 | exclude_patterns = ['_build'] |
35 | |
36 | -# The reST default role (used for this markup: `text`) to use for all documents. |
37 | +# The reST default role (used for this markup: `text`) to use for all |
38 | +# documents. |
39 | #default_role = None |
40 | |
41 | # If true, '()' will be appended to :func: etc. cross-reference text. |
42 | @@ -85,7 +87,7 @@ pygments_style = 'sphinx' |
43 | #modindex_common_prefix = [] |
44 | |
45 | |
46 | -# -- Options for HTML output --------------------------------------------------- |
47 | +# -- Options for HTML output -------------------------------------------------- |
48 | |
49 | # The theme to use for HTML and HTML Help pages. See the documentation for |
50 | # a list of builtin themes. |
51 | @@ -165,7 +167,7 @@ html_static_path = ['_static'] |
52 | htmlhelp_basename = 'Launchpaddoc' |
53 | |
54 | |
55 | -# -- Options for LaTeX output -------------------------------------------------- |
56 | +# -- Options for LaTeX output ------------------------------------------------- |
57 | |
58 | # The paper size ('letter' or 'a4'). |
59 | #latex_paper_size = 'letter' |
60 | @@ -174,7 +176,8 @@ htmlhelp_basename = 'Launchpaddoc' |
61 | #latex_font_size = '10pt' |
62 | |
63 | # Grouping the document tree into LaTeX files. List of tuples |
64 | -# (source start file, target name, title, author, documentclass [howto/manual]). |
65 | +# (source start file, target name, title, author, |
66 | +# documentclass [howto/manual]). |
67 | latex_documents = [ |
68 | ('index', 'Launchpad.tex', u'Launchpad Documentation', |
69 | u'The Launchpad Developers', 'manual'), |
70 | @@ -204,7 +207,7 @@ latex_documents = [ |
71 | #latex_domain_indices = True |
72 | |
73 | |
74 | -# -- Options for manual page output -------------------------------------------- |
75 | +# -- Options for manual page output ------------------------------------------- |
76 | |
77 | # One entry per manual page. List of tuples |
78 | # (source start file, name, description, authors, manual section). |
79 | diff --git a/lib/lp/app/validators/email.py b/lib/lp/app/validators/email.py |
80 | index ce959fc..04d02dc 100644 |
81 | --- a/lib/lp/app/validators/email.py |
82 | +++ b/lib/lp/app/validators/email.py |
83 | @@ -79,6 +79,7 @@ def email_validator(emailaddr): |
84 | >>> email_validator('bugs@example.com') |
85 | True |
86 | >>> email_validator('not-valid') |
87 | + ... # noqa |
88 | ... # doctest: +IGNORE_EXCEPTION_MODULE_IN_PYTHON2 |
89 | Traceback (most recent call last): |
90 | ... |
91 | diff --git a/lib/lp/app/validators/tests/test_validation.py b/lib/lp/app/validators/tests/test_validation.py |
92 | index 7c9c8b5..3cd87d9 100644 |
93 | --- a/lib/lp/app/validators/tests/test_validation.py |
94 | +++ b/lib/lp/app/validators/tests/test_validation.py |
95 | @@ -38,4 +38,5 @@ class TestOCIBranchValidator(TestCase): |
96 | self.assertTrue(validate_oci_branch_name('refs/tags/v2-1.0-20.04')) |
97 | |
98 | def test_validate_oci_branch_name_heads_and_tags(self): |
99 | - self.assertFalse(validate_oci_branch_name("refs/heads/refs/tags/v1.0-20.04")) |
100 | + self.assertFalse(validate_oci_branch_name( |
101 | + "refs/heads/refs/tags/v1.0-20.04")) |
102 | diff --git a/lib/lp/app/widgets/date.py b/lib/lp/app/widgets/date.py |
103 | index 85d0756..c24da8f 100644 |
104 | --- a/lib/lp/app/widgets/date.py |
105 | +++ b/lib/lp/app/widgets/date.py |
106 | @@ -85,6 +85,7 @@ class DateTimeWidget(TextWidget): |
107 | >>> widget.from_date = datetime(2006, 5, 23, |
108 | ... tzinfo=pytz.timezone('UTC')) |
109 | >>> print(widget.getInputValue()) |
110 | + ... # noqa |
111 | ... # doctest: +NORMALIZE_WHITESPACE,+ELLIPSIS |
112 | ... # doctest: +IGNORE_EXCEPTION_MODULE_IN_PYTHON2 |
113 | Traceback (most recent call last): |
114 | @@ -103,6 +104,7 @@ class DateTimeWidget(TextWidget): |
115 | >>> widget.to_date = datetime(2008, 1, 26, |
116 | ... tzinfo=pytz.timezone('UTC')) |
117 | >>> print(widget.getInputValue()) |
118 | + ... # noqa |
119 | ... # doctest: +NORMALIZE_WHITESPACE,+ELLIPSIS |
120 | ... # doctest: +IGNORE_EXCEPTION_MODULE_IN_PYTHON2 |
121 | Traceback (most recent call last): |
122 | diff --git a/lib/lp/archivepublisher/customupload.py b/lib/lp/archivepublisher/customupload.py |
123 | index 0c6a2c9..741211a 100644 |
124 | --- a/lib/lp/archivepublisher/customupload.py |
125 | +++ b/lib/lp/archivepublisher/customupload.py |
126 | @@ -27,7 +27,9 @@ from lp.archivepublisher.debversion import ( |
127 | Version as make_version, |
128 | VersionError, |
129 | ) |
130 | -from lp.archivepublisher.interfaces.archivegpgsigningkey import ISignableArchive |
131 | +from lp.archivepublisher.interfaces.archivegpgsigningkey import ( |
132 | + ISignableArchive, |
133 | + ) |
134 | from lp.services.librarian.utils import copy_and_close |
135 | from lp.soyuz.interfaces.queue import ( |
136 | CustomUploadError, |
137 | diff --git a/lib/lp/archivepublisher/tests/test_signing.py b/lib/lp/archivepublisher/tests/test_signing.py |
138 | index 8e01ca1..e57ae72 100644 |
139 | --- a/lib/lp/archivepublisher/tests/test_signing.py |
140 | +++ b/lib/lp/archivepublisher/tests/test_signing.py |
141 | @@ -1770,7 +1770,8 @@ class TestSigningUploadWithSigningService(TestSigningHelpers): |
142 | '1.0/empty.sipl.sig', '1.0/control/sipl.x509', |
143 | '1.0/empty.fit.signed', '1.0/control/fit.crt', |
144 | '1.0/empty.cv2-kernel.sig', '1.0/control/cv2-kernel.pub', |
145 | - '1.0/empty.android-kernel.sig', '1.0/control/android-kernel.x509', |
146 | + '1.0/empty.android-kernel.sig', |
147 | + '1.0/control/android-kernel.x509', |
148 | ], tarball.getnames()) |
149 | self.assertEqual(0, self.signing_service_client.generate.call_count) |
150 | keys = self.signing_keys |
151 | diff --git a/lib/lp/archiveuploader/tests/test_tagfiles.py b/lib/lp/archiveuploader/tests/test_tagfiles.py |
152 | index f5bf552..5c541d9 100755 |
153 | --- a/lib/lp/archiveuploader/tests/test_tagfiles.py |
154 | +++ b/lib/lp/archiveuploader/tests/test_tagfiles.py |
155 | @@ -119,9 +119,9 @@ class TestTagFileDebianPolicyCompat(unittest.TestCase): |
156 | Note: in the past, our parse_tagfile function left the leading |
157 | '\n' in the parsed value, whereas it should not have. |
158 | |
159 | - For an example, |
160 | - see http://www.debian.org/doc/debian-policy/ch-controlfields.html#s-f-Files |
161 | - """ |
162 | + For an example, see |
163 | + https://www.debian.org/doc/debian-policy/ch-controlfields.html#s-f-files |
164 | + """ # noqa: E501 |
165 | |
166 | expected_bytes = ( |
167 | b'f26bb9b29b1108e53139da3584a4dc92 1511 test75874_0.1.tar.gz\n ' |
168 | @@ -142,8 +142,8 @@ class TestTagFileDebianPolicyCompat(unittest.TestCase): |
169 | """Apt-pkg preserves the blank-line indicator and does not strip |
170 | leading spaces. |
171 | |
172 | - See http://www.debian.org/doc/debian-policy/ch-controlfields.html#s-f-Description |
173 | - """ |
174 | + See https://www.debian.org/doc/debian-policy/ch-controlfields.html#s-f-description |
175 | + """ # noqa: E501 |
176 | expected_bytes = ( |
177 | b"Here's the single-line synopsis.\n" |
178 | b" Then there is the extended description which can\n" |
179 | diff --git a/lib/lp/code/mail/tests/test_codehandler.py b/lib/lp/code/mail/tests/test_codehandler.py |
180 | index 47dc486..55fd4a5 100644 |
181 | --- a/lib/lp/code/mail/tests/test_codehandler.py |
182 | +++ b/lib/lp/code/mail/tests/test_codehandler.py |
183 | @@ -229,7 +229,8 @@ class TestCodeHandler(TestCaseWithFactory): |
184 | Error message: |
185 | |
186 | The 'review' command expects any of the following arguments: |
187 | - abstain, approve, disapprove, needs-fixing, needs-info, needs-resubmitting |
188 | + abstain, approve, disapprove, needs-fixing, needs-info, |
189 | + needs-resubmitting |
190 | |
191 | For example: |
192 | |
193 | diff --git a/lib/lp/code/mail/tests/test_codeimport.py b/lib/lp/code/mail/tests/test_codeimport.py |
194 | index b37f538..03411f5 100644 |
195 | --- a/lib/lp/code/mail/tests/test_codeimport.py |
196 | +++ b/lib/lp/code/mail/tests/test_codeimport.py |
197 | @@ -150,7 +150,8 @@ class TestNewCodeImports(TestCaseWithFactory): |
198 | self.assertEqual( |
199 | 'A new git code import has been requested ' |
200 | 'by Eric:\n' |
201 | - ' http://code.launchpad.test/~eric/foobuntu/manic/fooix/master\n' |
202 | + ' http://code.launchpad.test/' |
203 | + '~eric/foobuntu/manic/fooix/master\n' |
204 | 'from\n' |
205 | ' git://git.example.com/fooix.git\n' |
206 | '\n' |
207 | diff --git a/lib/lp/code/model/tests/test_branch.py b/lib/lp/code/model/tests/test_branch.py |
208 | index 1649dc9..d69c650 100644 |
209 | --- a/lib/lp/code/model/tests/test_branch.py |
210 | +++ b/lib/lp/code/model/tests/test_branch.py |
211 | @@ -3273,8 +3273,8 @@ class TestGetBzrBranch(TestCaseWithFactory): |
212 | self.useBzrBranches(direct_database=True) |
213 | |
214 | def test_simple(self): |
215 | - # open_only_scheme returns the underlying bzr branch of a database branch in |
216 | - # the simple, unstacked, case. |
217 | + # open_only_scheme returns the underlying bzr branch of a database |
218 | + # branch in the simple, unstacked, case. |
219 | db_branch, tree = self.create_branch_and_tree() |
220 | # XXX: AaronBentley 2010-08-06 bug=614404: a bzr username is |
221 | # required to generate the revision-id. |
222 | @@ -3335,7 +3335,8 @@ class TestBranchGetBlob(TestCaseWithFactory): |
223 | [((branch.id, 'some-file-id'), {'rev': 'scanned-id'})], |
224 | hosting_fixture.getBlob.calls) |
225 | key = ( |
226 | - 'bazaar.launchpad.test:bzr-file-list:%s:scanned-id:src' % branch.id) |
227 | + 'bazaar.launchpad.test:bzr-file-list:%s:scanned-id:src' % |
228 | + branch.id) |
229 | self.assertEqual( |
230 | json.dumps({'README.txt': 'some-file-id'}), |
231 | getUtility(IMemcacheClient).get(key.encode('UTF-8'))) |
232 | diff --git a/lib/lp/oci/tests/test_ocirecipe.py b/lib/lp/oci/tests/test_ocirecipe.py |
233 | index 95e30a8..c3bb8f8 100644 |
234 | --- a/lib/lp/oci/tests/test_ocirecipe.py |
235 | +++ b/lib/lp/oci/tests/test_ocirecipe.py |
236 | @@ -680,8 +680,8 @@ class TestOCIRecipe(OCIConfigHelperMixin, TestCaseWithFactory): |
237 | oci_project=oci_project, registrant=owner) |
238 | |
239 | self.assertRaises( |
240 | - OCIProjectRecipeInvalid, another_oci_project.setOfficialRecipeStatus, |
241 | - recipe, True) |
242 | + OCIProjectRecipeInvalid, |
243 | + another_oci_project.setOfficialRecipeStatus, recipe, True) |
244 | |
245 | def test_permission_check_on_setOfficialRecipe(self): |
246 | distro = self.factory.makeDistribution() |
247 | diff --git a/lib/lp/registry/model/distributionsourcepackage.py b/lib/lp/registry/model/distributionsourcepackage.py |
248 | index 863ae85..e7611be 100644 |
249 | --- a/lib/lp/registry/model/distributionsourcepackage.py |
250 | +++ b/lib/lp/registry/model/distributionsourcepackage.py |
251 | @@ -263,7 +263,8 @@ class DistributionSourcePackage(BugTargetBase, |
252 | self.distribution.all_distro_archive_ids), |
253 | SourcePackagePublishingHistory.sourcepackagerelease == |
254 | SourcePackageRelease.id, |
255 | - SourcePackagePublishingHistory.sourcepackagename == self.sourcepackagename, |
256 | + SourcePackagePublishingHistory.sourcepackagename == |
257 | + self.sourcepackagename, |
258 | SourcePackageRelease.sourcepackagename == self.sourcepackagename, |
259 | Cast(SourcePackageRelease.version, "text") == |
260 | six.ensure_text(version), |
261 | diff --git a/lib/lp/registry/tests/test_prf_walker.py b/lib/lp/registry/tests/test_prf_walker.py |
262 | index 9a1f32d..cf82294 100644 |
263 | --- a/lib/lp/registry/tests/test_prf_walker.py |
264 | +++ b/lib/lp/registry/tests/test_prf_walker.py |
265 | @@ -282,7 +282,7 @@ class HTTPWalker_ListDir(TestCase): |
266 | |
267 | <address>Apache/2.2.3 (Unix) Server at <a href="mailto:ftp-adm@acc.umu.se">ftp.acc.umu.se</a> Port 80</address> |
268 | </body></html> |
269 | - ''' |
270 | + ''' # noqa: E501 |
271 | listing_url = 'http://ftp.gnome.org/pub/GNOME/sources/gnome-gpg/0.5/' |
272 | responses.add('GET', listing_url, body=content) |
273 | expected_filenames = [ |
274 | @@ -323,7 +323,7 @@ FTP Directory: <A HREF="/">ftp://ftp.gnome.org</A>/<A HREF="/pub/">pub</A>/<A HR |
275 | <ADDRESS> |
276 | Generated Wed, 06 Sep 2006 11:04:02 GMT by squid (squid/2.5.STABLE12) |
277 | </ADDRESS></BODY></HTML> |
278 | - ''' |
279 | + ''' # noqa: E501 |
280 | listing_url = 'ftp://ftp.gnome.org/pub/GNOME/sources/gnome-gpg/0.5/' |
281 | responses.add('GET', listing_url, body=content) |
282 | walker = HTTPWalker(listing_url, logging.getLogger()) |
283 | diff --git a/lib/lp/services/librarianserver/testing/server.py b/lib/lp/services/librarianserver/testing/server.py |
284 | index 20bfdfd..535d504 100644 |
285 | --- a/lib/lp/services/librarianserver/testing/server.py |
286 | +++ b/lib/lp/services/librarianserver/testing/server.py |
287 | @@ -161,20 +161,29 @@ class LibrarianServerFixture(TacTestSetup): |
288 | return |
289 | chunks = self.getLogChunks() |
290 | # A typical startup: upload, download, restricted up, restricted down. |
291 | - #2017-12-09 06:33:13+0530 [-] Loading /home/ubuntu/launchpad/lp-branches/devel/daemons/librarian.tac... |
292 | - #2017-12-09 06:33:19+0530 [-] Loaded. |
293 | - #2017-12-09 06:33:19+0530 [-] twistd 16.5.0 (/home/ubuntu/launchpad/lp-branches/devel/env/bin/python2.7 2.7.12) starting up. |
294 | - #2017-12-09 06:33:19+0530 [-] reactor class: twisted.internet.epollreactor.EPollReactor. |
295 | - #2017-12-09 06:33:19+0530 [-] FileUploadFactory starting on 39851 |
296 | - #2017-12-09 06:33:19+0530 [-] Starting factory <lp.services.librarianserver.libraryprotocol.FileUploadFactory instance at 0xf0ef80ac> |
297 | - #2017-12-09 06:33:19+0530 [-] Site starting on 45355 |
298 | - #2017-12-09 06:33:19+0530 [-] Starting factory <twisted.web.server.Site instance at 0xf0ef848c> |
299 | - #2017-12-09 06:33:19+0530 [-] FileUploadFactory starting on 42150 |
300 | - #2017-12-09 06:33:19+0530 [-] Starting factory <lp.services.librarianserver.libraryprotocol.FileUploadFactory instance at 0xf0ef856c> |
301 | - #2017-12-09 06:33:19+0530 [-] Site starting on 37341 |
302 | - #2017-12-09 06:33:19+0530 [-] Starting factory <twisted.web.server.Site instance at 0xf0ef85ec> |
303 | - #2017-12-09 06:33:19+0530 [-] Not using upstream librarian |
304 | - #2017-12-09 06:33:19+0530 [-] daemon ready! |
305 | + # (Line-wrapped to pacify flake8.) |
306 | + # 2017-12-09 06:33:13+0530 [-] Loading .../daemons/librarian.tac... |
307 | + # 2017-12-09 06:33:19+0530 [-] Loaded. |
308 | + # 2017-12-09 06:33:19+0530 [-] twistd 16.5.0 |
309 | + # (.../env/bin/python2.7 2.7.12) starting up. |
310 | + # 2017-12-09 06:33:19+0530 [-] reactor class: |
311 | + # twisted.internet.epollreactor.EPollReactor. |
312 | + # 2017-12-09 06:33:19+0530 [-] FileUploadFactory starting on 39851 |
313 | + # 2017-12-09 06:33:19+0530 [-] Starting factory |
314 | + # <lp.services.librarianserver.libraryprotocol.FileUploadFactory |
315 | + # instance at 0xf0ef80ac> |
316 | + # 2017-12-09 06:33:19+0530 [-] Site starting on 45355 |
317 | + # 2017-12-09 06:33:19+0530 [-] Starting factory |
318 | + # <twisted.web.server.Site instance at 0xf0ef848c> |
319 | + # 2017-12-09 06:33:19+0530 [-] FileUploadFactory starting on 42150 |
320 | + # 2017-12-09 06:33:19+0530 [-] Starting factory |
321 | + # <lp.services.librarianserver.libraryprotocol.FileUploadFactory |
322 | + # instance at 0xf0ef856c> |
323 | + # 2017-12-09 06:33:19+0530 [-] Site starting on 37341 |
324 | + # 2017-12-09 06:33:19+0530 [-] Starting factory |
325 | + # <twisted.web.server.Site instance at 0xf0ef85ec> |
326 | + # 2017-12-09 06:33:19+0530 [-] Not using upstream librarian |
327 | + # 2017-12-09 06:33:19+0530 [-] daemon ready! |
328 | self.upload_port = int(chunks[4].split()[-1]) |
329 | self.download_port = int(chunks[6].split()[-1]) |
330 | self.restricted_upload_port = int(chunks[8].split()[-1]) |
331 | diff --git a/lib/lp/soyuz/browser/archivesubscription.py b/lib/lp/soyuz/browser/archivesubscription.py |
332 | index f05a506..e78b7cd 100644 |
333 | --- a/lib/lp/soyuz/browser/archivesubscription.py |
334 | +++ b/lib/lp/soyuz/browser/archivesubscription.py |
335 | @@ -129,7 +129,8 @@ class ArchiveSubscribersView(LaunchpadFormView): |
336 | |
337 | schema = IArchiveSubscriberUI |
338 | field_names = ['subscriber', 'date_expires', 'description'] |
339 | - custom_widget_description = CustomWidgetFactory(TextWidget, displayWidth=40) |
340 | + custom_widget_description = CustomWidgetFactory( |
341 | + TextWidget, displayWidth=40) |
342 | custom_widget_date_expires = DateWidget |
343 | custom_widget_subscriber = CustomWidgetFactory( |
344 | PersonPickerWidget, header="Select the subscriber") |
345 | diff --git a/lib/lp/soyuz/browser/tests/test_distroarchseries_webservice.py b/lib/lp/soyuz/browser/tests/test_distroarchseries_webservice.py |
346 | index 4555f60..1db0346 100644 |
347 | --- a/lib/lp/soyuz/browser/tests/test_distroarchseries_webservice.py |
348 | +++ b/lib/lp/soyuz/browser/tests/test_distroarchseries_webservice.py |
349 | @@ -198,7 +198,8 @@ class TestDistroArchSeriesWebservice(TestCaseWithFactory): |
350 | sha1_1 = hashlib.sha1(b'abcxyz').hexdigest() |
351 | ws_das.setChroot(data=b'abcxyz', sha1sum=sha1_1) |
352 | sha1_2 = hashlib.sha1(b'123456').hexdigest() |
353 | - ws_das.setChroot(data=b'123456', sha1sum=sha1_2, image_type='LXD image') |
354 | + ws_das.setChroot( |
355 | + data=b'123456', sha1sum=sha1_2, image_type='LXD image') |
356 | chroot_image = das.getChroot(image_type=BuildBaseImageType.CHROOT) |
357 | self.assertEqual(sha1_1, chroot_image.content.sha1) |
358 | lxd_image = das.getChroot(image_type=BuildBaseImageType.LXD) |
359 | diff --git a/lib/lp/soyuz/mail/tests/test_packageupload.py b/lib/lp/soyuz/mail/tests/test_packageupload.py |
360 | index c7378f9..1b59fd5 100644 |
361 | --- a/lib/lp/soyuz/mail/tests/test_packageupload.py |
362 | +++ b/lib/lp/soyuz/mail/tests/test_packageupload.py |
363 | @@ -243,7 +243,7 @@ class TestNotificationRequiringLibrarian(TestCaseWithFactory): |
364 | %s |
365 | http://launchpad.test/~archiver/+archive/ubuntu/ppa |
366 | You are receiving this email because you made this upload. |
367 | - """ % "-- ") |
368 | + """ % "-- ") # noqa: E501 |
369 | self.assertEqual(expected_body, body) |
370 | |
371 | |
372 | diff --git a/lib/lp/testing/keyserver/tests/test_web.py b/lib/lp/testing/keyserver/tests/test_web.py |
373 | index e11f86c..74c343b 100644 |
374 | --- a/lib/lp/testing/keyserver/tests/test_web.py |
375 | +++ b/lib/lp/testing/keyserver/tests/test_web.py |
376 | @@ -120,7 +120,7 @@ class TestWebResources(TestCase): |
377 | ... |
378 | pub 1024D/DFD20543 2005-04-13 Sample Person (revoked) <sample.revoked@canonical.com> |
379 | ... |
380 | -''') |
381 | +''') # noqa: E501 |
382 | |
383 | def test_content_lookup(self): |
384 | # A key content lookup form via GET. |
385 | diff --git a/lib/lp/translations/scripts/tests/test_packaging_translations.py b/lib/lp/translations/scripts/tests/test_packaging_translations.py |
386 | index 77673b8..766c749 100644 |
387 | --- a/lib/lp/translations/scripts/tests/test_packaging_translations.py |
388 | +++ b/lib/lp/translations/scripts/tests/test_packaging_translations.py |
389 | @@ -39,7 +39,7 @@ class TestMergeTranslations(TestCaseWithFactory): |
390 | INFO Merging template 1/2. |
391 | INFO Merging template 2/2. |
392 | INFO Ran 1 TranslationMergeJob jobs. |
393 | - """)) |
394 | + """)) # noqa: E501 |
395 | self.assertThat(stderr, matcher) |
396 | self.assertEqual('', stdout) |
397 | |
398 | @@ -57,6 +57,6 @@ class TestMergeTranslations(TestCaseWithFactory): |
399 | INFO Splitting .* and .* in Ubuntu Distroseries.* |
400 | INFO 1 entries split. |
401 | INFO Ran 1 TranslationSplitJob jobs. |
402 | - """)) |
403 | + """)) # noqa: E501 |
404 | self.assertThat(stderr, matcher) |
405 | self.assertEqual('', stdout) |
406 | diff --git a/lib/lp/translations/utilities/gettext_po_parser.py b/lib/lp/translations/utilities/gettext_po_parser.py |
407 | index 925af2d..4756050 100644 |
408 | --- a/lib/lp/translations/utilities/gettext_po_parser.py |
409 | +++ b/lib/lp/translations/utilities/gettext_po_parser.py |
410 | @@ -801,7 +801,7 @@ class POParser(object): |
411 | Traceback (most recent call last): |
412 | ... |
413 | lp.translations.interfaces.translationimporter.TranslationFormatSyntaxError: Extra content found after string: (x) |
414 | - """ |
415 | + """ # noqa: E501 |
416 | if self._escaped_line_break: |
417 | # Continuing a line after an escaped newline. Strip indentation. |
418 | string = string.lstrip() |
419 | diff --git a/lib/lp/translations/utilities/tests/test_gettext_po_exporter.py b/lib/lp/translations/utilities/tests/test_gettext_po_exporter.py |
420 | index 7bf5479..916965e 100644 |
421 | --- a/lib/lp/translations/utilities/tests/test_gettext_po_exporter.py |
422 | +++ b/lib/lp/translations/utilities/tests/test_gettext_po_exporter.py |
423 | @@ -133,7 +133,7 @@ class GettextPOExporterTestCase(TestCaseWithFactory): |
424 | |
425 | #~ msgid "zot" |
426 | #~ msgstr "zat" |
427 | - ''').encode('UTF-8') |
428 | + ''').encode('UTF-8') # noqa: E501 |
429 | cy_translation_file = self.parser.parse(pofile_cy) |
430 | cy_translation_file.is_template = False |
431 | cy_translation_file.language_code = 'cy' |
432 | diff --git a/lib/lp/translations/utilities/tests/test_xpi_po_exporter.py b/lib/lp/translations/utilities/tests/test_xpi_po_exporter.py |
433 | index 78ab7cc..a28be12 100644 |
434 | --- a/lib/lp/translations/utilities/tests/test_xpi_po_exporter.py |
435 | +++ b/lib/lp/translations/utilities/tests/test_xpi_po_exporter.py |
436 | @@ -80,7 +80,7 @@ test_xpi_header = dedent(u'''\ |
437 | </em:targetApplication> |
438 | </Description> |
439 | </RDF> |
440 | -''') |
441 | +''') # noqa: E501 |
442 | test_xpi_messages = [ |
443 | (u'foozilla.menu.title', u'main/subdir/test2.dtd', |
444 | u'jar:chrome/en-US.jar!/subdir/test2.dtd', u'MENU', |
445 | @@ -385,7 +385,7 @@ class XPIPOExporterTestCase(TestCase): |
446 | msgctxt "main/test1.properties" |
447 | msgid "Дан=Day" |
448 | msgstr "" |
449 | - ''').strip() |
450 | + ''').strip() # noqa: E501 |
451 | |
452 | output = storage.export().read().decode("utf-8") |
453 | self._compareExpectedAndExported(expected_template, output) |
454 | diff --git a/scripts/update-stacked-on.py b/scripts/update-stacked-on.py |
455 | index 1648ec9..85d4df3 100755 |
456 | --- a/scripts/update-stacked-on.py |
457 | +++ b/scripts/update-stacked-on.py |
458 | @@ -6,7 +6,8 @@ |
459 | """Update stacked_on_location for all Bazaar branches. |
460 | |
461 | Expects standard input of: |
462 | - '<id> <branch_type> <unique_name> <stacked_on_id> <stacked_on_unique_name>\n'. |
463 | + '<id> <branch_type> <unique_name> <stacked_on_id> |
464 | + <stacked_on_unique_name>\n'. |
465 | |
466 | Such input can be provided using "get-stacked-on-branches.py". |
467 | |
468 | diff --git a/test_on_merge.py b/test_on_merge.py |
469 | index a1cd0e2..59fa01b 100755 |
470 | --- a/test_on_merge.py |
471 | +++ b/test_on_merge.py |
472 | @@ -179,7 +179,8 @@ def run_test_process(): |
473 | # bzr. -- mbp 20100924 |
474 | while True: |
475 | try: |
476 | - rlist, wlist, xlist = select.select(open_readers, [], [], TIMEOUT) |
477 | + rlist, wlist, xlist = select.select( |
478 | + open_readers, [], [], TIMEOUT) |
479 | break |
480 | except select.error as e: |
481 | # nb: select.error doesn't expose a named 'errno' attribute, |
482 | diff --git a/utilities/community-contributions.py b/utilities/community-contributions.py |
483 | index 10f07e9..d9c59e2 100755 |
484 | --- a/utilities/community-contributions.py |
485 | +++ b/utilities/community-contributions.py |
486 | @@ -104,111 +104,112 @@ CANONICAL_ADDR = wiki_encode(u" {_AT_} canonical.com") |
487 | |
488 | # People on the Canonical Launchpad team. |
489 | known_canonical_lp_devs = \ |
490 | - [wiki_encode(x) for x in (u'Aaron Bentley', |
491 | - u'Abel Deuring', |
492 | - u'Andrew Bennetts', |
493 | - u'Barry Warsaw', |
494 | - u'Benji York', |
495 | - u'Bjorn Tillenius', |
496 | - u'Björn Tillenius', |
497 | - u'Brad Bollenbach', |
498 | - u'Brad Crittenden', |
499 | - u'Brian Fromme', |
500 | - u'Canonical.com Patch Queue Manager', |
501 | - u'Carlos Perello Marin', |
502 | - u'Carlos Perelló Marín', |
503 | - u'carlos.perello {_AT_} canonical.com', |
504 | - u'Celso Providelo', |
505 | - u'Christian Reis', |
506 | - u'Christian Robottom Reis', |
507 | - u'kiko {_AT_} beetle', |
508 | - u'Colin Watson', |
509 | - u'Curtis Hovey', |
510 | - u'Dafydd Harries', |
511 | - u'Danilo Šegan', |
512 | - u'Danilo Segan', |
513 | - u'david <david {_AT_} marvin>', |
514 | - u'Данило Шеган', |
515 | - u'данило шеган', |
516 | - u'Daniel Silverstone', |
517 | - u'David Allouche', |
518 | - u'Deryck Hodge', |
519 | - u'Diogo Matsubara', |
520 | - u'Edwin Grubbs', |
521 | - u'Elliot Murphy', |
522 | - u'Firstname Lastname', |
523 | - u'Francesco Banconi', |
524 | - u'Francis Lacoste', |
525 | - u'Francis J. Lacoste', |
526 | - u'Gary Poster', |
527 | - u'Gavin Panella', |
528 | - u'Graham Binns', |
529 | - u'Guilherme Salgado', |
530 | - u'Henning Eggers', |
531 | - u'Herb McNew', |
532 | - u'Huw Wilkins', |
533 | - u'Ian Booth', |
534 | - u'James Henstridge', |
535 | - u'j.c.sackett', |
536 | - u'jc', |
537 | - u'Jelmer Vernooij', |
538 | - u'Jeroen Vermeulen', |
539 | - u'Jeroen T. Vermeulen', |
540 | - u'Joey Stanford', |
541 | - u'Jon Sackett', |
542 | - u'Jonathan Lange', |
543 | - u'j.c.sackett', |
544 | - u'jonathan.sackett {_AT_} canonical.com', |
545 | - u'jml {_AT_} canonical.com', |
546 | - u'jml {_AT_} mumak.net', |
547 | - u'Jonathan Knowles', |
548 | - u'jonathan.knowles {_AT_} canonical.com', |
549 | - u'Julian Edwards', |
550 | - u'Karl Fogel', |
551 | - u'Kit Randel', |
552 | - u'Launch Pad', |
553 | - u'Launchpad APA', |
554 | - u'Launchpad Developers', |
555 | - u'Launchpad Patch Queue Manager', |
556 | - u'Launchpad PQM Bot', |
557 | - u'Leonard Richardson', |
558 | - u'Malcolm Cleaton', |
559 | - u'Maris Fogels', |
560 | - u'Mark Shuttleworth', |
561 | - u'Martin Albisetti', |
562 | - u'Matt Zimmerman', |
563 | - u'Matthew Paul Thomas', |
564 | - u'Matthew Thomas', |
565 | - u'Matthew Revell', |
566 | - u'matthew.revell {_AT_} canonical.com', |
567 | - u'Michael Hudson', |
568 | - u'michael.hudson {_AT_} canonical.com', |
569 | - u'Michael Nelson', |
570 | - u'Muharem Hrnjadovic', |
571 | - u'muharem {_AT_} canonical.com', |
572 | - u'Patch Queue Manager', |
573 | - u'Paul Hummer', |
574 | - u'Raphael Badin', |
575 | - u'Raphaël Badin', |
576 | - u'Richard Harding', |
577 | - u'Rick Harding', |
578 | - u'Rick harding', |
579 | - u'Robert Collins', |
580 | - u'root <root {_AT_} ubuntu>', |
581 | - u'rvb', |
582 | - u'Stuart Bishop', |
583 | - u'Steve Alexander', |
584 | - u'Steve Kowalik', |
585 | - u'Steve McInerney', |
586 | - u'<steve {_AT_} stedee.id.au>', |
587 | - u'test {_AT_} canonical.com', |
588 | - u'Tom Haddon', |
589 | - u'Tim Penhey', |
590 | - u'Tom Berger', |
591 | - u'ubuntu <ubuntu {_AT_} lp-dev>', |
592 | - u'Ursula Junque', |
593 | - u'William Grant <william.grant {_AT_} canonical.com>', |
594 | - )] |
595 | + [wiki_encode(x) for x in ( |
596 | + u'Aaron Bentley', |
597 | + u'Abel Deuring', |
598 | + u'Andrew Bennetts', |
599 | + u'Barry Warsaw', |
600 | + u'Benji York', |
601 | + u'Bjorn Tillenius', |
602 | + u'Björn Tillenius', |
603 | + u'Brad Bollenbach', |
604 | + u'Brad Crittenden', |
605 | + u'Brian Fromme', |
606 | + u'Canonical.com Patch Queue Manager', |
607 | + u'Carlos Perello Marin', |
608 | + u'Carlos Perelló Marín', |
609 | + u'carlos.perello {_AT_} canonical.com', |
610 | + u'Celso Providelo', |
611 | + u'Christian Reis', |
612 | + u'Christian Robottom Reis', |
613 | + u'kiko {_AT_} beetle', |
614 | + u'Colin Watson', |
615 | + u'Curtis Hovey', |
616 | + u'Dafydd Harries', |
617 | + u'Danilo Šegan', |
618 | + u'Danilo Segan', |
619 | + u'david <david {_AT_} marvin>', |
620 | + u'Данило Шеган', |
621 | + u'данило шеган', |
622 | + u'Daniel Silverstone', |
623 | + u'David Allouche', |
624 | + u'Deryck Hodge', |
625 | + u'Diogo Matsubara', |
626 | + u'Edwin Grubbs', |
627 | + u'Elliot Murphy', |
628 | + u'Firstname Lastname', |
629 | + u'Francesco Banconi', |
630 | + u'Francis Lacoste', |
631 | + u'Francis J. Lacoste', |
632 | + u'Gary Poster', |
633 | + u'Gavin Panella', |
634 | + u'Graham Binns', |
635 | + u'Guilherme Salgado', |
636 | + u'Henning Eggers', |
637 | + u'Herb McNew', |
638 | + u'Huw Wilkins', |
639 | + u'Ian Booth', |
640 | + u'James Henstridge', |
641 | + u'j.c.sackett', |
642 | + u'jc', |
643 | + u'Jelmer Vernooij', |
644 | + u'Jeroen Vermeulen', |
645 | + u'Jeroen T. Vermeulen', |
646 | + u'Joey Stanford', |
647 | + u'Jon Sackett', |
648 | + u'Jonathan Lange', |
649 | + u'j.c.sackett', |
650 | + u'jonathan.sackett {_AT_} canonical.com', |
651 | + u'jml {_AT_} canonical.com', |
652 | + u'jml {_AT_} mumak.net', |
653 | + u'Jonathan Knowles', |
654 | + u'jonathan.knowles {_AT_} canonical.com', |
655 | + u'Julian Edwards', |
656 | + u'Karl Fogel', |
657 | + u'Kit Randel', |
658 | + u'Launch Pad', |
659 | + u'Launchpad APA', |
660 | + u'Launchpad Developers', |
661 | + u'Launchpad Patch Queue Manager', |
662 | + u'Launchpad PQM Bot', |
663 | + u'Leonard Richardson', |
664 | + u'Malcolm Cleaton', |
665 | + u'Maris Fogels', |
666 | + u'Mark Shuttleworth', |
667 | + u'Martin Albisetti', |
668 | + u'Matt Zimmerman', |
669 | + u'Matthew Paul Thomas', |
670 | + u'Matthew Thomas', |
671 | + u'Matthew Revell', |
672 | + u'matthew.revell {_AT_} canonical.com', |
673 | + u'Michael Hudson', |
674 | + u'michael.hudson {_AT_} canonical.com', |
675 | + u'Michael Nelson', |
676 | + u'Muharem Hrnjadovic', |
677 | + u'muharem {_AT_} canonical.com', |
678 | + u'Patch Queue Manager', |
679 | + u'Paul Hummer', |
680 | + u'Raphael Badin', |
681 | + u'Raphaël Badin', |
682 | + u'Richard Harding', |
683 | + u'Rick Harding', |
684 | + u'Rick harding', |
685 | + u'Robert Collins', |
686 | + u'root <root {_AT_} ubuntu>', |
687 | + u'rvb', |
688 | + u'Stuart Bishop', |
689 | + u'Steve Alexander', |
690 | + u'Steve Kowalik', |
691 | + u'Steve McInerney', |
692 | + u'<steve {_AT_} stedee.id.au>', |
693 | + u'test {_AT_} canonical.com', |
694 | + u'Tom Haddon', |
695 | + u'Tim Penhey', |
696 | + u'Tom Berger', |
697 | + u'ubuntu <ubuntu {_AT_} lp-dev>', |
698 | + u'Ursula Junque', |
699 | + u'William Grant <william.grant {_AT_} canonical.com>', |
700 | + )] |
701 | |
702 | # People known to work for Canonical but not on the Launchpad team. |
703 | # Anyone with "@canonical.com" in their email address is considered to |
704 | @@ -641,7 +642,7 @@ generates this page is \ |
705 | [[https://bazaar.launchpad.net/%7Elaunchpad-pqm/launchpad/devel/annotate/head%3A/utilities/community-contributions.py|utilities/community-contributions.py]] \ |
706 | in the Launchpad tree.''-~ |
707 | |
708 | -""" |
709 | +""" # noqa: E501 |
710 | |
711 | |
712 | def main(): |
Looks good!