Merge ~cristiangsp/launchpad:linting-e402 into launchpad:master
- Git
- lp:~cristiangsp/launchpad
- linting-e402
- Merge into master
Proposed by
Cristian Gonzalez
Status: | Merged |
---|---|
Approved by: | Cristian Gonzalez |
Approved revision: | 9721b47f6edc29e87610b29cbd6116cecd6d4bfd |
Merge reported by: | Otto Co-Pilot |
Merged at revision: | not available |
Proposed branch: | ~cristiangsp/launchpad:linting-e402 |
Merge into: | launchpad:master |
Diff against target: |
351 lines (+44/-55) 18 files modified
lib/lp/app/__init__.py (+2/-4) lib/lp/bugs/interfaces/bug.py (+1/-1) lib/lp/bugs/interfaces/bugsubscription.py (+1/-1) lib/lp/bugs/model/bug.py (+1/-1) lib/lp/code/bzr.py (+1/-4) lib/lp/codehosting/__init__.py (+1/-1) lib/lp/codehosting/puller/__init__.py (+1/-2) lib/lp/registry/interfaces/product.py (+1/-1) lib/lp/scripts/utilities/importpedant.py (+4/-5) lib/lp/scripts/utilities/warninghandler.py (+15/-16) lib/lp/services/job/celeryjob.py (+1/-2) lib/lp/services/job/tests/celery_helpers.py (+2/-2) lib/lp/services/scripts/tests/loglevels.py (+7/-8) lib/lp/testing/html5browser.py (+1/-1) lib/lp/testing/swift/fakeswift.tac (+1/-2) scripts/wsgi-archive-auth.py (+2/-2) utilities/format-imports (+1/-1) utilities/update-sourcecode (+1/-1) |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Colin Watson (community) | Approve | ||
Review via email: mp+406632@code.launchpad.net |
Commit message
Fixing E402 linting errors
Description of the change
Fixing E402 linting errors
To post a comment you must log in.
Revision history for this message
Colin Watson (cjwatson) : | # |
review:
Approve
Revision history for this message
Colin Watson (cjwatson) : | # |
review:
Approve
Preview Diff
[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1 | diff --git a/lib/lp/app/__init__.py b/lib/lp/app/__init__.py | |||
2 | index e79d7bd..7006d36 100644 | |||
3 | --- a/lib/lp/app/__init__.py | |||
4 | +++ b/lib/lp/app/__init__.py | |||
5 | @@ -15,10 +15,8 @@ __all__ = [] | |||
6 | 15 | # values, but they kindly left this global variable for you to monkey patch if | 15 | # values, but they kindly left this global variable for you to monkey patch if |
7 | 16 | # you want the old behaviour, just like we do. | 16 | # you want the old behaviour, just like we do. |
8 | 17 | from zope.formlib import itemswidgets | 17 | from zope.formlib import itemswidgets |
9 | 18 | |||
10 | 19 | |||
11 | 20 | itemswidgets.EXPLICIT_EMPTY_SELECTION = False | ||
12 | 21 | |||
13 | 22 | # Load versioninfo.py so that we get errors on start-up rather than waiting | 18 | # Load versioninfo.py so that we get errors on start-up rather than waiting |
14 | 23 | # for first page load. | 19 | # for first page load. |
15 | 24 | import lp.app.versioninfo # noqa: F401 | 20 | import lp.app.versioninfo # noqa: F401 |
16 | 21 | |||
17 | 22 | itemswidgets.EXPLICIT_EMPTY_SELECTION = False | ||
18 | diff --git a/lib/lp/bugs/interfaces/bug.py b/lib/lp/bugs/interfaces/bug.py | |||
19 | index 4c14118..5fde710 100644 | |||
20 | --- a/lib/lp/bugs/interfaces/bug.py | |||
21 | +++ b/lib/lp/bugs/interfaces/bug.py | |||
22 | @@ -1029,7 +1029,7 @@ patch_collection_property(ICve, 'bugs', IBug) | |||
23 | 1029 | # In order to avoid circular dependencies, we only import | 1029 | # In order to avoid circular dependencies, we only import |
24 | 1030 | # IBugSubscription (which itself imports IBug) here, and assign it as | 1030 | # IBugSubscription (which itself imports IBug) here, and assign it as |
25 | 1031 | # the value type for the `subscriptions` collection. | 1031 | # the value type for the `subscriptions` collection. |
27 | 1032 | from lp.bugs.interfaces.bugsubscription import IBugSubscription | 1032 | from lp.bugs.interfaces.bugsubscription import IBugSubscription # noqa: E402 |
28 | 1033 | patch_collection_property(IBug, 'subscriptions', IBugSubscription) | 1033 | patch_collection_property(IBug, 'subscriptions', IBugSubscription) |
29 | 1034 | 1034 | ||
30 | 1035 | 1035 | ||
31 | diff --git a/lib/lp/bugs/interfaces/bugsubscription.py b/lib/lp/bugs/interfaces/bugsubscription.py | |||
32 | index f0241d4..3913944 100644 | |||
33 | --- a/lib/lp/bugs/interfaces/bugsubscription.py | |||
34 | +++ b/lib/lp/bugs/interfaces/bugsubscription.py | |||
35 | @@ -86,5 +86,5 @@ class IBugSubscription(Interface): | |||
36 | 86 | # In order to avoid circular dependencies, we only import | 86 | # In order to avoid circular dependencies, we only import |
37 | 87 | # IBug (which itself imports IBugSubscription) here, and assign it as | 87 | # IBug (which itself imports IBugSubscription) here, and assign it as |
38 | 88 | # the value type for the `bug` reference. | 88 | # the value type for the `bug` reference. |
40 | 89 | from lp.bugs.interfaces.bug import IBug | 89 | from lp.bugs.interfaces.bug import IBug # noqa: E402 |
41 | 90 | patch_reference_property(IBugSubscription, 'bug', IBug) | 90 | patch_reference_property(IBugSubscription, 'bug', IBug) |
42 | diff --git a/lib/lp/bugs/model/bug.py b/lib/lp/bugs/model/bug.py | |||
43 | index c1cc4c8..4f4ea06 100644 | |||
44 | --- a/lib/lp/bugs/model/bug.py | |||
45 | +++ b/lib/lp/bugs/model/bug.py | |||
46 | @@ -75,6 +75,7 @@ from zope.component import getUtility | |||
47 | 75 | from zope.contenttype import guess_content_type | 75 | from zope.contenttype import guess_content_type |
48 | 76 | from zope.event import notify | 76 | from zope.event import notify |
49 | 77 | from zope.interface import implementer | 77 | from zope.interface import implementer |
50 | 78 | from zope.security import checker | ||
51 | 78 | from zope.security.interfaces import Unauthorized | 79 | from zope.security.interfaces import Unauthorized |
52 | 79 | from zope.security.proxy import ( | 80 | from zope.security.proxy import ( |
53 | 80 | ProxyFactory, | 81 | ProxyFactory, |
54 | @@ -2385,7 +2386,6 @@ class StructuralSubscriptionSet(FrozenSetBasedSet): | |||
55 | 2385 | # writing ZCML tedious, so I've opted for registering custom checkers (see | 2386 | # writing ZCML tedious, so I've opted for registering custom checkers (see |
56 | 2386 | # lp_sitecustomize for some other jiggery pokery in the same vein) while I | 2387 | # lp_sitecustomize for some other jiggery pokery in the same vein) while I |
57 | 2387 | # seek a better solution. | 2388 | # seek a better solution. |
58 | 2388 | from zope.security import checker | ||
59 | 2389 | checker_for_frozen_set = checker.getCheckerForInstancesOf(frozenset) | 2389 | checker_for_frozen_set = checker.getCheckerForInstancesOf(frozenset) |
60 | 2390 | checker_for_subscriber_set = checker.NamesChecker(["sorted"]) | 2390 | checker_for_subscriber_set = checker.NamesChecker(["sorted"]) |
61 | 2391 | checker_for_subscription_set = checker.NamesChecker(["sorted", "subscribers"]) | 2391 | checker_for_subscription_set = checker.NamesChecker(["sorted", "subscribers"]) |
62 | diff --git a/lib/lp/code/bzr.py b/lib/lp/code/bzr.py | |||
63 | index 88d7abb..e823fc2 100644 | |||
64 | --- a/lib/lp/code/bzr.py | |||
65 | +++ b/lib/lp/code/bzr.py | |||
66 | @@ -19,10 +19,7 @@ __all__ = [ | |||
67 | 19 | 19 | ||
68 | 20 | # FIRST Ensure correct plugins are loaded. Do not delete this comment or the | 20 | # FIRST Ensure correct plugins are loaded. Do not delete this comment or the |
69 | 21 | # line below this comment. | 21 | # line below this comment. |
74 | 22 | import lp.codehosting | 22 | import lp.codehosting # noqa: F401 |
71 | 23 | |||
72 | 24 | # Silence lint warning. | ||
73 | 25 | lp.codehosting | ||
75 | 26 | 23 | ||
76 | 27 | from breezy.branch import UnstackableBranchFormat | 24 | from breezy.branch import UnstackableBranchFormat |
77 | 28 | from breezy.bzr.branch import ( | 25 | from breezy.bzr.branch import ( |
78 | diff --git a/lib/lp/codehosting/__init__.py b/lib/lp/codehosting/__init__.py | |||
79 | index c194128..09b1b64 100644 | |||
80 | --- a/lib/lp/codehosting/__init__.py | |||
81 | +++ b/lib/lp/codehosting/__init__.py | |||
82 | @@ -82,6 +82,6 @@ def dont_wrap_class_and_subclasses(cls): | |||
83 | 82 | 82 | ||
84 | 83 | # Don't wrap Branch or its subclasses in Zope security proxies. Make sure | 83 | # Don't wrap Branch or its subclasses in Zope security proxies. Make sure |
85 | 84 | # the various LoomBranch classes are present first. | 84 | # the various LoomBranch classes are present first. |
87 | 85 | import breezy.plugins.loom.branch | 85 | import breezy.plugins.loom.branch # noqa: E402 |
88 | 86 | breezy.plugins.loom.branch | 86 | breezy.plugins.loom.branch |
89 | 87 | dont_wrap_class_and_subclasses(Branch) | 87 | dont_wrap_class_and_subclasses(Branch) |
90 | diff --git a/lib/lp/codehosting/puller/__init__.py b/lib/lp/codehosting/puller/__init__.py | |||
91 | index 48ec941..e1582ed 100644 | |||
92 | --- a/lib/lp/codehosting/puller/__init__.py | |||
93 | +++ b/lib/lp/codehosting/puller/__init__.py | |||
94 | @@ -10,14 +10,13 @@ import datetime | |||
95 | 10 | import pytz | 10 | import pytz |
96 | 11 | from twisted.internet import defer | 11 | from twisted.internet import defer |
97 | 12 | 12 | ||
98 | 13 | from lp.codehosting.puller.scheduler import LockError | ||
99 | 13 | 14 | ||
100 | 14 | def get_lock_id_for_branch_id(branch_id): | 15 | def get_lock_id_for_branch_id(branch_id): |
101 | 15 | """Return the lock id that should be used for a branch with the passed id. | 16 | """Return the lock id that should be used for a branch with the passed id. |
102 | 16 | """ | 17 | """ |
103 | 17 | return 'worker-for-branch-%s@supermirror' % (branch_id,) | 18 | return 'worker-for-branch-%s@supermirror' % (branch_id,) |
104 | 18 | 19 | ||
105 | 19 | from lp.codehosting.puller.scheduler import LockError | ||
106 | 20 | |||
107 | 21 | UTC = pytz.timezone('UTC') | 20 | UTC = pytz.timezone('UTC') |
108 | 22 | 21 | ||
109 | 23 | 22 | ||
110 | diff --git a/lib/lp/registry/interfaces/product.py b/lib/lp/registry/interfaces/product.py | |||
111 | index e5ac436..b770b13 100644 | |||
112 | --- a/lib/lp/registry/interfaces/product.py | |||
113 | +++ b/lib/lp/registry/interfaces/product.py | |||
114 | @@ -1184,7 +1184,7 @@ class InvalidProductName(LaunchpadValidationError): | |||
115 | 1184 | 1184 | ||
116 | 1185 | 1185 | ||
117 | 1186 | # Fix circular imports. | 1186 | # Fix circular imports. |
119 | 1187 | from lp.registry.interfaces.distributionsourcepackage import ( | 1187 | from lp.registry.interfaces.distributionsourcepackage import ( # noqa: E402 |
120 | 1188 | IDistributionSourcePackage) | 1188 | IDistributionSourcePackage) |
121 | 1189 | patch_reference_property( | 1189 | patch_reference_property( |
122 | 1190 | IDistributionSourcePackage, 'upstream_product', IProduct) | 1190 | IDistributionSourcePackage, 'upstream_product', IProduct) |
123 | diff --git a/lib/lp/scripts/utilities/importpedant.py b/lib/lp/scripts/utilities/importpedant.py | |||
124 | index dc837e5..160af05 100644 | |||
125 | --- a/lib/lp/scripts/utilities/importpedant.py | |||
126 | +++ b/lib/lp/scripts/utilities/importpedant.py | |||
127 | @@ -5,20 +5,19 @@ import atexit | |||
128 | 5 | import itertools | 5 | import itertools |
129 | 6 | from operator import attrgetter | 6 | from operator import attrgetter |
130 | 7 | import types | 7 | import types |
131 | 8 | import warnings | ||
132 | 8 | 9 | ||
133 | 9 | import six | 10 | import six |
134 | 10 | from six.moves import builtins | 11 | from six.moves import builtins |
135 | 11 | 12 | ||
136 | 12 | |||
137 | 13 | original_import = builtins.__import__ | ||
138 | 14 | naughty_imports = set() | ||
139 | 15 | |||
140 | 16 | # Silence bogus warnings from Hardy's python-pkg-resources package. | 13 | # Silence bogus warnings from Hardy's python-pkg-resources package. |
141 | 17 | import warnings | ||
142 | 18 | warnings.filterwarnings('ignore', category=UserWarning, append=True, | 14 | warnings.filterwarnings('ignore', category=UserWarning, append=True, |
143 | 19 | message=r'Module .*? is being added to sys.path') | 15 | message=r'Module .*? is being added to sys.path') |
144 | 20 | 16 | ||
145 | 21 | 17 | ||
146 | 18 | original_import = builtins.__import__ | ||
147 | 19 | naughty_imports = set() | ||
148 | 20 | |||
149 | 22 | # Sometimes, third-party modules don't export all of their public APIs through | 21 | # Sometimes, third-party modules don't export all of their public APIs through |
150 | 23 | # __all__. The following dict maps from such modules to a list of attributes | 22 | # __all__. The following dict maps from such modules to a list of attributes |
151 | 24 | # that are allowed to be imported, whether or not they are in __all__. | 23 | # that are allowed to be imported, whether or not they are in __all__. |
152 | diff --git a/lib/lp/scripts/utilities/warninghandler.py b/lib/lp/scripts/utilities/warninghandler.py | |||
153 | index 3620a1c..88827e6 100644 | |||
154 | --- a/lib/lp/scripts/utilities/warninghandler.py | |||
155 | +++ b/lib/lp/scripts/utilities/warninghandler.py | |||
156 | @@ -6,10 +6,24 @@ | |||
157 | 6 | __metaclass__ = type | 6 | __metaclass__ = type |
158 | 7 | 7 | ||
159 | 8 | import inspect | 8 | import inspect |
160 | 9 | import six | ||
161 | 9 | import sys | 10 | import sys |
162 | 10 | import warnings | 11 | import warnings |
163 | 11 | 12 | ||
165 | 12 | import six | 13 | # ViewPageTemplateFile has .filename. |
166 | 14 | from zope.browserpage import ViewPageTemplateFile | ||
167 | 15 | |||
168 | 16 | # PythonExpr has .text, the text of the expression. | ||
169 | 17 | from zope.tales.pythonexpr import PythonExpr | ||
170 | 18 | |||
171 | 19 | # TrustedZopeContext has self.contexts, a dict with template, view, context, | ||
172 | 20 | # request, etc. | ||
173 | 21 | from zope.pagetemplate.engine import TrustedZopeContext | ||
174 | 22 | |||
175 | 23 | # TALInterpreter has self.sourceFile, a filename of a page template. | ||
176 | 24 | from zope.tal.talinterpreter import TALInterpreter | ||
177 | 25 | |||
178 | 26 | from zope.browserpage.simpleviewclass import simple | ||
179 | 13 | 27 | ||
180 | 14 | 28 | ||
181 | 15 | class WarningReport: | 29 | class WarningReport: |
182 | @@ -58,21 +72,6 @@ class ImportantInfo: | |||
183 | 58 | L.append('request url: %s' % self.requesturl) | 72 | L.append('request url: %s' % self.requesturl) |
184 | 59 | return '\n'.join(L) | 73 | return '\n'.join(L) |
185 | 60 | 74 | ||
186 | 61 | # ViewPageTemplateFile has .filename. | ||
187 | 62 | from zope.browserpage import ViewPageTemplateFile | ||
188 | 63 | |||
189 | 64 | # PythonExpr has .text, the text of the expression. | ||
190 | 65 | from zope.tales.pythonexpr import PythonExpr | ||
191 | 66 | |||
192 | 67 | # TrustedZopeContext has self.contexts, a dict with template, view, context, | ||
193 | 68 | # request, etc. | ||
194 | 69 | from zope.pagetemplate.engine import TrustedZopeContext | ||
195 | 70 | |||
196 | 71 | # TALInterpreter has self.sourceFile, a filename of a page template. | ||
197 | 72 | from zope.tal.talinterpreter import TALInterpreter | ||
198 | 73 | |||
199 | 74 | from zope.browserpage.simpleviewclass import simple | ||
200 | 75 | |||
201 | 76 | 75 | ||
202 | 77 | def find_important_info(): | 76 | def find_important_info(): |
203 | 78 | stack = inspect.stack() | 77 | stack = inspect.stack() |
204 | diff --git a/lib/lp/services/job/celeryjob.py b/lib/lp/services/job/celeryjob.py | |||
205 | index b4ae220..7d9e8b6 100644 | |||
206 | --- a/lib/lp/services/job/celeryjob.py | |||
207 | +++ b/lib/lp/services/job/celeryjob.py | |||
208 | @@ -21,8 +21,6 @@ from logging import info | |||
209 | 21 | import os | 21 | import os |
210 | 22 | from uuid import uuid4 | 22 | from uuid import uuid4 |
211 | 23 | 23 | ||
212 | 24 | |||
213 | 25 | os.environ.setdefault('CELERY_CONFIG_MODULE', 'lp.services.job.celeryconfig') | ||
214 | 26 | from celery import ( | 24 | from celery import ( |
215 | 27 | Celery, | 25 | Celery, |
216 | 28 | Task, | 26 | Task, |
217 | @@ -46,6 +44,7 @@ from lp.services.job.runner import ( | |||
218 | 46 | ) | 44 | ) |
219 | 47 | from lp.services import scripts | 45 | from lp.services import scripts |
220 | 48 | 46 | ||
221 | 47 | os.environ.setdefault('CELERY_CONFIG_MODULE', 'lp.services.job.celeryconfig') | ||
222 | 49 | 48 | ||
223 | 50 | celery_app = Celery() | 49 | celery_app = Celery() |
224 | 51 | 50 | ||
225 | diff --git a/lib/lp/services/job/tests/celery_helpers.py b/lib/lp/services/job/tests/celery_helpers.py | |||
226 | index b0d5ba4..c378b6f 100644 | |||
227 | --- a/lib/lp/services/job/tests/celery_helpers.py | |||
228 | +++ b/lib/lp/services/job/tests/celery_helpers.py | |||
229 | @@ -8,14 +8,14 @@ __all__ = [ | |||
230 | 8 | 'pop_notifications' | 8 | 'pop_notifications' |
231 | 9 | ] | 9 | ] |
232 | 10 | 10 | ||
233 | 11 | from celery.task import task | ||
234 | 12 | |||
235 | 11 | # Force the correct celeryconfig to be used. | 13 | # Force the correct celeryconfig to be used. |
236 | 12 | import lp.services.job.celeryjob | 14 | import lp.services.job.celeryjob |
237 | 13 | 15 | ||
238 | 14 | # Quiet lint unused import warning. | 16 | # Quiet lint unused import warning. |
239 | 15 | lp.services.job.celeryjob | 17 | lp.services.job.celeryjob |
240 | 16 | 18 | ||
241 | 17 | from celery.task import task | ||
242 | 18 | |||
243 | 19 | 19 | ||
244 | 20 | @task | 20 | @task |
245 | 21 | def pop_notifications(): | 21 | def pop_notifications(): |
246 | diff --git a/lib/lp/services/scripts/tests/loglevels.py b/lib/lp/services/scripts/tests/loglevels.py | |||
247 | index 3849fc4..0e91e44 100644 | |||
248 | --- a/lib/lp/services/scripts/tests/loglevels.py | |||
249 | +++ b/lib/lp/services/scripts/tests/loglevels.py | |||
250 | @@ -9,22 +9,21 @@ Used by test_logger.txt. | |||
251 | 9 | __metaclass__ = type | 9 | __metaclass__ = type |
252 | 10 | __all__ = [] | 10 | __all__ = [] |
253 | 11 | 11 | ||
255 | 12 | # Monkey patch time.gmtime to make our tests easier to read. | 12 | from optparse import OptionParser |
256 | 13 | import time | 13 | import time |
257 | 14 | 14 | ||
258 | 15 | from lp.services.scripts.logger import ( | ||
259 | 16 | logger, | ||
260 | 17 | logger_options, | ||
261 | 18 | ) | ||
262 | 19 | |||
263 | 15 | 20 | ||
264 | 21 | # Monkey patch time.gmtime to make our tests easier to read. | ||
265 | 16 | def fake_gmtime(ignored_seconds): | 22 | def fake_gmtime(ignored_seconds): |
266 | 17 | # 1985-12-21 13:45:55 | 23 | # 1985-12-21 13:45:55 |
267 | 18 | return (1985, 12, 21, 13, 45, 55, 5, 355, 0) | 24 | return (1985, 12, 21, 13, 45, 55, 5, 355, 0) |
268 | 19 | time.gmtime = fake_gmtime | 25 | time.gmtime = fake_gmtime |
269 | 20 | 26 | ||
270 | 21 | from optparse import OptionParser | ||
271 | 22 | |||
272 | 23 | from lp.services.scripts.logger import ( | ||
273 | 24 | logger, | ||
274 | 25 | logger_options, | ||
275 | 26 | ) | ||
276 | 27 | |||
277 | 28 | parser = OptionParser() | 27 | parser = OptionParser() |
278 | 29 | logger_options(parser) | 28 | logger_options(parser) |
279 | 30 | 29 | ||
280 | diff --git a/lib/lp/testing/html5browser.py b/lib/lp/testing/html5browser.py | |||
281 | index b314667..7dd3a37 100644 | |||
282 | --- a/lib/lp/testing/html5browser.py | |||
283 | +++ b/lib/lp/testing/html5browser.py | |||
284 | @@ -34,7 +34,7 @@ import gi | |||
285 | 34 | gi.require_version('Gtk', '3.0') | 34 | gi.require_version('Gtk', '3.0') |
286 | 35 | gi.require_version('WebKit', '3.0') | 35 | gi.require_version('WebKit', '3.0') |
287 | 36 | 36 | ||
289 | 37 | from gi.repository import ( | 37 | from gi.repository import ( # noqa: E402 |
290 | 38 | GLib, | 38 | GLib, |
291 | 39 | Gtk, | 39 | Gtk, |
292 | 40 | WebKit, | 40 | WebKit, |
293 | diff --git a/lib/lp/testing/swift/fakeswift.tac b/lib/lp/testing/swift/fakeswift.tac | |||
294 | index 742658d..c5c95b8 100644 | |||
295 | --- a/lib/lp/testing/swift/fakeswift.tac | |||
296 | +++ b/lib/lp/testing/swift/fakeswift.tac | |||
297 | @@ -12,11 +12,10 @@ import logging | |||
298 | 12 | 12 | ||
299 | 13 | import twisted.web.server | 13 | import twisted.web.server |
300 | 14 | from twisted.application import internet, service | 14 | from twisted.application import internet, service |
301 | 15 | from lp.testing.swift.fakeswift import Root | ||
302 | 15 | 16 | ||
303 | 16 | logging.basicConfig() | 17 | logging.basicConfig() |
304 | 17 | 18 | ||
305 | 18 | from lp.testing.swift.fakeswift import Root | ||
306 | 19 | |||
307 | 20 | storedir = os.environ['SWIFT_ROOT'] | 19 | storedir = os.environ['SWIFT_ROOT'] |
308 | 21 | assert os.path.exists(storedir) | 20 | assert os.path.exists(storedir) |
309 | 22 | 21 | ||
310 | diff --git a/scripts/wsgi-archive-auth.py b/scripts/wsgi-archive-auth.py | |||
311 | index b5490ee..30c3096 100755 | |||
312 | --- a/scripts/wsgi-archive-auth.py | |||
313 | +++ b/scripts/wsgi-archive-auth.py | |||
314 | @@ -32,9 +32,9 @@ top = os.path.dirname(scripts_dir) | |||
315 | 32 | sys.modules.pop("site", None) | 32 | sys.modules.pop("site", None) |
316 | 33 | sys.modules.pop("sitecustomize", None) | 33 | sys.modules.pop("sitecustomize", None) |
317 | 34 | 34 | ||
319 | 35 | import _pythonpath # noqa: F401 | 35 | import _pythonpath # noqa: F401,E402 |
320 | 36 | 36 | ||
322 | 37 | from lp.soyuz.wsgi.archiveauth import check_password | 37 | from lp.soyuz.wsgi.archiveauth import check_password # noqa: E402 |
323 | 38 | 38 | ||
324 | 39 | 39 | ||
325 | 40 | def main(): | 40 | def main(): |
326 | diff --git a/utilities/format-imports b/utilities/format-imports | |||
327 | index 5e93624..39ecf52 100755 | |||
328 | --- a/utilities/format-imports | |||
329 | +++ b/utilities/format-imports | |||
330 | @@ -134,7 +134,7 @@ import sys | |||
331 | 134 | from textwrap import dedent | 134 | from textwrap import dedent |
332 | 135 | 135 | ||
333 | 136 | sys.path[0:0] = [os.path.dirname(__file__)] | 136 | sys.path[0:0] = [os.path.dirname(__file__)] |
335 | 137 | from python_standard_libs import python_standard_libs | 137 | from python_standard_libs import python_standard_libs # noqa: E402 |
336 | 138 | 138 | ||
337 | 139 | # python_standard_libs is only used for membership tests. | 139 | # python_standard_libs is only used for membership tests. |
338 | 140 | python_standard_libs = frozenset(python_standard_libs) | 140 | python_standard_libs = frozenset(python_standard_libs) |
339 | diff --git a/utilities/update-sourcecode b/utilities/update-sourcecode | |||
340 | index a10eb01..107460a 100755 | |||
341 | --- a/utilities/update-sourcecode | |||
342 | +++ b/utilities/update-sourcecode | |||
343 | @@ -12,7 +12,7 @@ import sys | |||
344 | 12 | sys.path.insert(0, | 12 | sys.path.insert(0, |
345 | 13 | os.path.join(os.path.dirname(os.path.dirname(__file__)), 'lib')) | 13 | os.path.join(os.path.dirname(os.path.dirname(__file__)), 'lib')) |
346 | 14 | 14 | ||
348 | 15 | from devscripts import sourcecode | 15 | from devscripts import sourcecode # noqa: E402 |
349 | 16 | 16 | ||
350 | 17 | 17 | ||
351 | 18 | if __name__ == '__main__': | 18 | if __name__ == '__main__': |