1 |
commit: 897be5c2874ed3edda7b3af84e6ddb34c3095b71 |
2 |
Author: Aaron Bauman <bman <AT> gentoo <DOT> org> |
3 |
AuthorDate: Thu Aug 6 04:05:20 2020 +0000 |
4 |
Commit: Zac Medico <zmedico <AT> gentoo <DOT> org> |
5 |
CommitDate: Thu Aug 6 06:06:07 2020 +0000 |
6 |
URL: https://gitweb.gentoo.org/proj/portage.git/commit/?id=897be5c2 |
7 |
|
8 |
lib/*: fix superfluous-parens and enable check |
9 |
|
10 |
Signed-off-by: Aaron Bauman <bman <AT> gentoo.org> |
11 |
Signed-off-by: Zac Medico <zmedico <AT> gentoo.org> |
12 |
|
13 |
lib/_emerge/actions.py | 14 +++++++------- |
14 |
lib/_emerge/resolver/slot_collision.py | 4 ++-- |
15 |
lib/_emerge/stdout_spinner.py | 2 +- |
16 |
lib/_emerge/unmerge.py | 4 ++-- |
17 |
lib/portage/_sets/dbapi.py | 6 +++--- |
18 |
lib/portage/cache/template.py | 2 +- |
19 |
lib/portage/dep/__init__.py | 10 +++++----- |
20 |
lib/portage/dep/dep_check.py | 2 +- |
21 |
lib/portage/getbinpkg.py | 6 +++--- |
22 |
lib/portage/glsa.py | 2 +- |
23 |
lib/portage/localization.py | 2 +- |
24 |
lib/portage/locks.py | 2 +- |
25 |
lib/portage/manifest.py | 2 +- |
26 |
lib/portage/news.py | 4 ++-- |
27 |
lib/portage/package/ebuild/config.py | 2 +- |
28 |
lib/portage/process.py | 6 +++--- |
29 |
lib/portage/sync/controller.py | 4 ++-- |
30 |
lib/portage/sync/modules/rsync/rsync.py | 8 ++++---- |
31 |
lib/portage/tests/resolver/ResolverPlayground.py | 2 +- |
32 |
lib/portage/util/__init__.py | 4 ++-- |
33 |
lib/portage/util/env_update.py | 2 +- |
34 |
lib/portage/xpak.py | 10 +++++----- |
35 |
pylintrc | 1 + |
36 |
23 files changed, 51 insertions(+), 50 deletions(-) |
37 |
|
38 |
diff --git a/lib/_emerge/actions.py b/lib/_emerge/actions.py |
39 |
index 43e9de43a..7d2d9b315 100644 |
40 |
--- a/lib/_emerge/actions.py |
41 |
+++ b/lib/_emerge/actions.py |
42 |
@@ -333,7 +333,7 @@ def action_build(emerge_config, trees=DeprecationWarning, |
43 |
|
44 |
return 1 |
45 |
else: |
46 |
- if ("--resume" in myopts): |
47 |
+ if "--resume" in myopts: |
48 |
print(darkgreen("emerge: It seems we have nothing to resume...")) |
49 |
return os.EX_OK |
50 |
|
51 |
@@ -450,7 +450,7 @@ def action_build(emerge_config, trees=DeprecationWarning, |
52 |
myopts.pop("--ask", None) |
53 |
|
54 |
if ("--pretend" in myopts) and not ("--fetchonly" in myopts or "--fetch-all-uri" in myopts): |
55 |
- if ("--resume" in myopts): |
56 |
+ if "--resume" in myopts: |
57 |
mymergelist = mydepgraph.altlist() |
58 |
if len(mymergelist) == 0: |
59 |
print(colorize("INFORM", "emerge: It seems we have nothing to resume...")) |
60 |
@@ -522,7 +522,7 @@ def action_build(emerge_config, trees=DeprecationWarning, |
61 |
level=logging.ERROR, noiselevel=-1) |
62 |
return 1 |
63 |
|
64 |
- if ("--resume" in myopts): |
65 |
+ if "--resume" in myopts: |
66 |
favorites=mtimedb["resume"]["favorites"] |
67 |
|
68 |
else: |
69 |
@@ -2319,7 +2319,7 @@ def adjust_config(myopts, settings): |
70 |
settings.backup_changes("PORTAGE_VERBOSE") |
71 |
|
72 |
# Set so that configs will be merged regardless of remembered status |
73 |
- if ("--noconfmem" in myopts): |
74 |
+ if "--noconfmem" in myopts: |
75 |
settings["NOCONFMEM"]="1" |
76 |
settings.backup_changes("NOCONFMEM") |
77 |
|
78 |
@@ -2424,7 +2424,7 @@ def getportageversion(portdir, _unused, profile, chost, vardb): |
79 |
if profilever is None: |
80 |
try: |
81 |
profilever = "!" + os.readlink(profile) |
82 |
- except (OSError): |
83 |
+ except OSError: |
84 |
pass |
85 |
|
86 |
if profilever is None: |
87 |
@@ -3057,7 +3057,7 @@ def run_action(emerge_config): |
88 |
level=logging.ERROR, noiselevel=-1) |
89 |
return 1 |
90 |
|
91 |
- if ("--quiet" in emerge_config.opts): |
92 |
+ if "--quiet" in emerge_config.opts: |
93 |
spinner.update = spinner.update_quiet |
94 |
portage.util.noiselimit = -1 |
95 |
|
96 |
@@ -3085,7 +3085,7 @@ def run_action(emerge_config): |
97 |
if "python-trace" in emerge_config.target_config.settings.features: |
98 |
portage.debug.set_trace(True) |
99 |
|
100 |
- if not ("--quiet" in emerge_config.opts): |
101 |
+ if not "--quiet" in emerge_config.opts: |
102 |
if '--nospinner' in emerge_config.opts or \ |
103 |
emerge_config.target_config.settings.get('TERM') == 'dumb' or \ |
104 |
not sys.stdout.isatty(): |
105 |
|
106 |
diff --git a/lib/_emerge/resolver/slot_collision.py b/lib/_emerge/resolver/slot_collision.py |
107 |
index 7536ce7a2..df3816717 100644 |
108 |
--- a/lib/_emerge/resolver/slot_collision.py |
109 |
+++ b/lib/_emerge/resolver/slot_collision.py |
110 |
@@ -138,8 +138,8 @@ class slot_conflict_handler: |
111 |
config_gen = _configuration_generator(conflict_pkgs) |
112 |
first_config = True |
113 |
|
114 |
- #go through all configurations and collect solutions |
115 |
- while(True): |
116 |
+ # Go through all configurations and collect solutions |
117 |
+ while True: |
118 |
config = config_gen.get_configuration() |
119 |
if not config: |
120 |
break |
121 |
|
122 |
diff --git a/lib/_emerge/stdout_spinner.py b/lib/_emerge/stdout_spinner.py |
123 |
index 26592b7b0..70e132683 100644 |
124 |
--- a/lib/_emerge/stdout_spinner.py |
125 |
+++ b/lib/_emerge/stdout_spinner.py |
126 |
@@ -65,7 +65,7 @@ class stdout_spinner: |
127 |
def update_scroll(self): |
128 |
if self._return_early(): |
129 |
return True |
130 |
- if(self.spinpos >= len(self.scroll_sequence)): |
131 |
+ if self.spinpos >= len(self.scroll_sequence): |
132 |
sys.stdout.write(darkgreen(" \b\b\b" + self.scroll_sequence[ |
133 |
len(self.scroll_sequence) - 1 - (self.spinpos % len(self.scroll_sequence))])) |
134 |
else: |
135 |
|
136 |
diff --git a/lib/_emerge/unmerge.py b/lib/_emerge/unmerge.py |
137 |
index 5204ac6f0..548edaf0c 100644 |
138 |
--- a/lib/_emerge/unmerge.py |
139 |
+++ b/lib/_emerge/unmerge.py |
140 |
@@ -168,7 +168,7 @@ def _unmerge_display(root_config, myopts, unmerge_action, |
141 |
"="+"/".join(sp_absx[sp_vdb_len:])) |
142 |
|
143 |
newline="" |
144 |
- if (not "--quiet" in myopts): |
145 |
+ if not "--quiet" in myopts: |
146 |
newline="\n" |
147 |
if settings["ROOT"] != "/": |
148 |
writemsg_level(darkgreen(newline+ \ |
149 |
@@ -176,7 +176,7 @@ def _unmerge_display(root_config, myopts, unmerge_action, |
150 |
settings["ROOT"])) |
151 |
|
152 |
if (("--pretend" in myopts) or ("--ask" in myopts)) and \ |
153 |
- not ("--quiet" in myopts): |
154 |
+ not "--quiet" in myopts: |
155 |
writemsg_level(darkgreen(newline+\ |
156 |
">>> These are the packages that would be unmerged:\n")) |
157 |
|
158 |
|
159 |
diff --git a/lib/portage/_sets/dbapi.py b/lib/portage/_sets/dbapi.py |
160 |
index 15d1c3786..288e4e75b 100644 |
161 |
--- a/lib/portage/_sets/dbapi.py |
162 |
+++ b/lib/portage/_sets/dbapi.py |
163 |
@@ -418,7 +418,7 @@ class DateSet(EverythingSet): |
164 |
|
165 |
setformat = formats[0] |
166 |
|
167 |
- if (setformat == "package"): |
168 |
+ if setformat == "package": |
169 |
package = options.get("package") |
170 |
try: |
171 |
cpv = vardbapi.match(package)[0] |
172 |
@@ -426,13 +426,13 @@ class DateSet(EverythingSet): |
173 |
date = int(date) |
174 |
except (KeyError, ValueError): |
175 |
raise SetConfigError(_("cannot determine installation date of package %s") % package) |
176 |
- elif (setformat == "filestamp"): |
177 |
+ elif setformat == "filestamp": |
178 |
filestamp = options.get("filestamp") |
179 |
try: |
180 |
date = int(os.stat(filestamp).st_mtime) |
181 |
except (OSError, ValueError): |
182 |
raise SetConfigError(_("cannot determine 'filestamp' of '%s'") % filestamp) |
183 |
- elif (setformat == "seconds"): |
184 |
+ elif setformat == "seconds": |
185 |
try: |
186 |
date = int(options.get("seconds")) |
187 |
except ValueError: |
188 |
|
189 |
diff --git a/lib/portage/cache/template.py b/lib/portage/cache/template.py |
190 |
index c8351a924..31a4acc44 100644 |
191 |
--- a/lib/portage/cache/template.py |
192 |
+++ b/lib/portage/cache/template.py |
193 |
@@ -179,7 +179,7 @@ class database: |
194 |
|
195 |
def sync(self, rate=0): |
196 |
self.sync_rate = rate |
197 |
- if(rate == 0): |
198 |
+ if rate == 0: |
199 |
self.commit() |
200 |
|
201 |
def commit(self): |
202 |
|
203 |
diff --git a/lib/portage/dep/__init__.py b/lib/portage/dep/__init__.py |
204 |
index c0ed2dd3c..3f0ef7ece 100644 |
205 |
--- a/lib/portage/dep/__init__.py |
206 |
+++ b/lib/portage/dep/__init__.py |
207 |
@@ -1903,7 +1903,7 @@ def dep_getusedeps( depend ): |
208 |
# -1 = failure (think c++ string::npos) |
209 |
comma_separated = False |
210 |
bracket_count = 0 |
211 |
- while( open_bracket != -1 ): |
212 |
+ while open_bracket != -1: |
213 |
bracket_count += 1 |
214 |
if bracket_count > 1: |
215 |
raise InvalidAtom(_("USE Dependency with more " |
216 |
@@ -2612,13 +2612,13 @@ def check_required_use(required_use, use, iuse_match, eapi=None): |
217 |
return True |
218 |
|
219 |
if operator == "||": |
220 |
- return (True in argument) |
221 |
+ return True in argument |
222 |
if operator == "^^": |
223 |
- return (argument.count(True) == 1) |
224 |
+ return argument.count(True) == 1 |
225 |
if operator == "??": |
226 |
- return (argument.count(True) <= 1) |
227 |
+ return argument.count(True) <= 1 |
228 |
if operator[-1] == "?": |
229 |
- return (False not in argument) |
230 |
+ return False not in argument |
231 |
|
232 |
mysplit = required_use.split() |
233 |
level = 0 |
234 |
|
235 |
diff --git a/lib/portage/dep/dep_check.py b/lib/portage/dep/dep_check.py |
236 |
index b6491a430..60c8ec6d0 100644 |
237 |
--- a/lib/portage/dep/dep_check.py |
238 |
+++ b/lib/portage/dep/dep_check.py |
239 |
@@ -736,7 +736,7 @@ def dep_zapdeps(unreduced, reduced, myroot, use_binaries=0, trees=None, |
240 |
if choice.all_available or allow_masked: |
241 |
return choice.atoms |
242 |
|
243 |
- assert(False) # This point should not be reachable |
244 |
+ assert False # This point should not be reachable |
245 |
|
246 |
def dep_check(depstring, mydbapi, mysettings, use="yes", mode=None, myuse=None, |
247 |
use_cache=1, use_binaries=0, myroot=None, trees=None): |
248 |
|
249 |
diff --git a/lib/portage/getbinpkg.py b/lib/portage/getbinpkg.py |
250 |
index d588b324b..0384986d1 100644 |
251 |
--- a/lib/portage/getbinpkg.py |
252 |
+++ b/lib/portage/getbinpkg.py |
253 |
@@ -180,7 +180,7 @@ def create_conn(baseurl, conn=None): |
254 |
conn = http_client_HTTPConnection(host) |
255 |
elif protocol == "ftp": |
256 |
passive = 1 |
257 |
- if(host[-1] == "*"): |
258 |
+ if host[-1] == "*": |
259 |
passive = 0 |
260 |
host = host[:-1] |
261 |
conn = ftplib.FTP(host) |
262 |
@@ -287,10 +287,10 @@ def make_http_request(conn, address, _params={}, headers={}, dest=None): |
263 |
for x in str(response.msg).split("\n"): |
264 |
parts = x.split(": ", 1) |
265 |
if parts[0] == "Location": |
266 |
- if (rc == 301): |
267 |
+ if rc == 301: |
268 |
sys.stderr.write(colorize("BAD", |
269 |
_("Location has moved: ")) + str(parts[1]) + "\n") |
270 |
- if (rc == 302): |
271 |
+ if rc == 302: |
272 |
sys.stderr.write(colorize("BAD", |
273 |
_("Location has temporarily moved: ")) + \ |
274 |
str(parts[1]) + "\n") |
275 |
|
276 |
diff --git a/lib/portage/glsa.py b/lib/portage/glsa.py |
277 |
index 12b33f45d..27957180b 100644 |
278 |
--- a/lib/portage/glsa.py |
279 |
+++ b/lib/portage/glsa.py |
280 |
@@ -666,7 +666,7 @@ class Glsa: |
281 |
if not os.access(os.path.join(self.config["EROOT"], |
282 |
PRIVATE_PATH, "glsa_injected"), os.R_OK): |
283 |
return False |
284 |
- return (self.nr in get_applied_glsas(self.config)) |
285 |
+ return self.nr in get_applied_glsas(self.config) |
286 |
|
287 |
def inject(self): |
288 |
""" |
289 |
|
290 |
diff --git a/lib/portage/localization.py b/lib/portage/localization.py |
291 |
index b215b9cba..de54295a2 100644 |
292 |
--- a/lib/portage/localization.py |
293 |
+++ b/lib/portage/localization.py |
294 |
@@ -43,4 +43,4 @@ def localized_size(num_bytes): |
295 |
except UnicodeDecodeError: |
296 |
# failure to decode locale data |
297 |
formatted_num = str(num_kib) |
298 |
- return (_unicode_decode(formatted_num, encoding=_encodings['stdio']) + ' KiB') |
299 |
+ return _unicode_decode(formatted_num, encoding=_encodings['stdio']) + ' KiB' |
300 |
|
301 |
diff --git a/lib/portage/locks.py b/lib/portage/locks.py |
302 |
index 5fa6d5d38..701093024 100644 |
303 |
--- a/lib/portage/locks.py |
304 |
+++ b/lib/portage/locks.py |
305 |
@@ -441,7 +441,7 @@ def unlockfile(mytuple): |
306 |
else: |
307 |
raise InvalidData |
308 |
|
309 |
- if(myfd == HARDLINK_FD): |
310 |
+ if myfd == HARDLINK_FD: |
311 |
unhardlink_lockfile(lockfilename, unlinkfile=unlinkfile) |
312 |
return True |
313 |
|
314 |
|
315 |
diff --git a/lib/portage/manifest.py b/lib/portage/manifest.py |
316 |
index d43f7d836..51a93b35e 100644 |
317 |
--- a/lib/portage/manifest.py |
318 |
+++ b/lib/portage/manifest.py |
319 |
@@ -421,7 +421,7 @@ class Manifest: |
320 |
|
321 |
def hasFile(self, ftype, fname): |
322 |
""" Return whether the Manifest contains an entry for the given type,filename pair """ |
323 |
- return (fname in self.fhashdict[ftype]) |
324 |
+ return fname in self.fhashdict[ftype] |
325 |
|
326 |
def findFile(self, fname): |
327 |
""" Return entrytype of the given file if present in Manifest or None if not present """ |
328 |
|
329 |
diff --git a/lib/portage/news.py b/lib/portage/news.py |
330 |
index 21a7c6a1f..3d6b04e1e 100644 |
331 |
--- a/lib/portage/news.py |
332 |
+++ b/lib/portage/news.py |
333 |
@@ -346,8 +346,8 @@ class DisplayProfileRestriction(DisplayRestriction): |
334 |
|
335 |
def checkRestriction(self, **kwargs): |
336 |
if fnmatch.fnmatch(self.format, '2.*') and self.profile.endswith('/*'): |
337 |
- return (kwargs['profile'].startswith(self.profile[:-1])) |
338 |
- return (kwargs['profile'] == self.profile) |
339 |
+ return kwargs['profile'].startswith(self.profile[:-1]) |
340 |
+ return kwargs['profile'] == self.profile |
341 |
|
342 |
class DisplayKeywordRestriction(DisplayRestriction): |
343 |
""" |
344 |
|
345 |
diff --git a/lib/portage/package/ebuild/config.py b/lib/portage/package/ebuild/config.py |
346 |
index 74b998d0b..b62ad3069 100644 |
347 |
--- a/lib/portage/package/ebuild/config.py |
348 |
+++ b/lib/portage/package/ebuild/config.py |
349 |
@@ -2344,7 +2344,7 @@ class config: |
350 |
if not x: |
351 |
continue |
352 |
|
353 |
- if (x[0]=="-"): |
354 |
+ if x[0] == "-": |
355 |
myflags.discard(x[1:]) |
356 |
continue |
357 |
|
358 |
|
359 |
diff --git a/lib/portage/process.py b/lib/portage/process.py |
360 |
index 1ff886bf3..8d4cf164e 100644 |
361 |
--- a/lib/portage/process.py |
362 |
+++ b/lib/portage/process.py |
363 |
@@ -433,11 +433,11 @@ def spawn(mycommand, env=None, opt_name=None, fd_pipes=None, returnpid=False, |
364 |
os.waitpid(pid, 0) |
365 |
|
366 |
# If it got a signal, return the signal that was sent. |
367 |
- if (retval & 0xff): |
368 |
- return ((retval & 0xff) << 8) |
369 |
+ if retval & 0xff: |
370 |
+ return (retval & 0xff) << 8 |
371 |
|
372 |
# Otherwise, return its exit code. |
373 |
- return (retval >> 8) |
374 |
+ return retval >> 8 |
375 |
|
376 |
# Everything succeeded |
377 |
return 0 |
378 |
|
379 |
diff --git a/lib/portage/sync/controller.py b/lib/portage/sync/controller.py |
380 |
index 6b47ae953..93cf7bfb4 100644 |
381 |
--- a/lib/portage/sync/controller.py |
382 |
+++ b/lib/portage/sync/controller.py |
383 |
@@ -44,8 +44,8 @@ class TaskHandler: |
384 |
def run_tasks(self, tasks, func, status=None, verbose=True, options=None): |
385 |
"""Runs the module tasks""" |
386 |
# Ensure we have a task and function |
387 |
- assert(tasks) |
388 |
- assert(func) |
389 |
+ assert tasks |
390 |
+ assert func |
391 |
for task in tasks: |
392 |
inst = task() |
393 |
show_progress = self.show_progress_bar and self.isatty |
394 |
|
395 |
diff --git a/lib/portage/sync/modules/rsync/rsync.py b/lib/portage/sync/modules/rsync/rsync.py |
396 |
index 4ccf7769f..cf574208d 100644 |
397 |
--- a/lib/portage/sync/modules/rsync/rsync.py |
398 |
+++ b/lib/portage/sync/modules/rsync/rsync.py |
399 |
@@ -293,7 +293,7 @@ class RsyncSync(NewBase): |
400 |
effective_maxretries = len(uris) - 1 |
401 |
|
402 |
local_state_unchanged = True |
403 |
- while (1): |
404 |
+ while 1: |
405 |
if uris: |
406 |
dosyncuri = uris.pop() |
407 |
elif maxretries < 0 or retries > maxretries: |
408 |
@@ -304,7 +304,7 @@ class RsyncSync(NewBase): |
409 |
uris.extend(uris_orig) |
410 |
dosyncuri = uris.pop() |
411 |
|
412 |
- if (retries==0): |
413 |
+ if retries == 0: |
414 |
if "--ask" in opts: |
415 |
uq = UserQuery(opts) |
416 |
if uq.query("Do you want to sync your ebuild repository " + \ |
417 |
@@ -422,7 +422,7 @@ class RsyncSync(NewBase): |
418 |
openpgp_env.close() |
419 |
|
420 |
def _process_exitcode(self, exitcode, syncuri, out, maxretries): |
421 |
- if (exitcode==0): |
422 |
+ if exitcode == 0: |
423 |
pass |
424 |
elif exitcode == SERVER_OUT_OF_DATE: |
425 |
exitcode = 1 |
426 |
@@ -430,7 +430,7 @@ class RsyncSync(NewBase): |
427 |
sys.stderr.write( |
428 |
">>> Exceeded PORTAGE_RSYNC_RETRIES: %s\n" % maxretries) |
429 |
exitcode = 1 |
430 |
- elif (exitcode>0): |
431 |
+ elif exitcode > 0: |
432 |
msg = [] |
433 |
if exitcode==1: |
434 |
msg.append("Rsync has reported that there is a syntax error. Please ensure") |
435 |
|
436 |
diff --git a/lib/portage/tests/resolver/ResolverPlayground.py b/lib/portage/tests/resolver/ResolverPlayground.py |
437 |
index 1e382002a..89feea47a 100644 |
438 |
--- a/lib/portage/tests/resolver/ResolverPlayground.py |
439 |
+++ b/lib/portage/tests/resolver/ResolverPlayground.py |
440 |
@@ -756,7 +756,7 @@ class ResolverPlaygroundTestCase: |
441 |
|
442 |
if match and self.merge_order_assertions: |
443 |
for node1, node2 in self.merge_order_assertions: |
444 |
- if not (got.index(node1) < got.index(node2)): |
445 |
+ if not got.index(node1) < got.index(node2): |
446 |
fail_msgs.append("atoms: (" + \ |
447 |
", ".join(result.atoms) + "), key: " + \ |
448 |
("merge_order_assertions, expected: %s" % \ |
449 |
|
450 |
diff --git a/lib/portage/util/__init__.py b/lib/portage/util/__init__.py |
451 |
index 84f1391f6..c14c15fe8 100644 |
452 |
--- a/lib/portage/util/__init__.py |
453 |
+++ b/lib/portage/util/__init__.py |
454 |
@@ -787,7 +787,7 @@ def varexpand(mystring, mydict=None, error_leader=None): |
455 |
while pos < length: |
456 |
current = mystring[pos] |
457 |
if current == "'": |
458 |
- if (indoub): |
459 |
+ if indoub: |
460 |
newstring.append("'") |
461 |
else: |
462 |
newstring.append("'") # Quote removal is handled by shlex. |
463 |
@@ -795,7 +795,7 @@ def varexpand(mystring, mydict=None, error_leader=None): |
464 |
pos += 1 |
465 |
continue |
466 |
elif current == '"': |
467 |
- if (insing): |
468 |
+ if insing: |
469 |
newstring.append('"') |
470 |
else: |
471 |
newstring.append('"') # Quote removal is handled by shlex. |
472 |
|
473 |
diff --git a/lib/portage/util/env_update.py b/lib/portage/util/env_update.py |
474 |
index 7a2ee2551..f130b6f6b 100644 |
475 |
--- a/lib/portage/util/env_update.py |
476 |
+++ b/lib/portage/util/env_update.py |
477 |
@@ -182,7 +182,7 @@ def _env_update(makelinks, target_root, prev_mtimes, contents, env, |
478 |
oldld = None |
479 |
|
480 |
newld = specials["LDPATH"] |
481 |
- if (oldld != newld): |
482 |
+ if oldld != newld: |
483 |
#ld.so.conf needs updating and ldconfig needs to be run |
484 |
myfd = atomic_ofstream(ldsoconf_path) |
485 |
myfd.write("# ld.so.conf autogenerated by env-update; make all changes to\n") |
486 |
|
487 |
diff --git a/lib/portage/xpak.py b/lib/portage/xpak.py |
488 |
index 746ef6f5a..2a4bcda21 100644 |
489 |
--- a/lib/portage/xpak.py |
490 |
+++ b/lib/portage/xpak.py |
491 |
@@ -213,7 +213,7 @@ def getindex_mem(myindex): |
492 |
myindexlen = len(myindex) |
493 |
startpos = 0 |
494 |
myret = [] |
495 |
- while ((startpos + 8) < myindexlen): |
496 |
+ while (startpos + 8) < myindexlen: |
497 |
mytestlen = decodeint(myindex[startpos:startpos + 4]) |
498 |
myret = myret + [myindex[startpos + 4:startpos + 4 + mytestlen]] |
499 |
startpos = startpos + mytestlen + 12 |
500 |
@@ -227,7 +227,7 @@ def searchindex(myindex, myitem): |
501 |
mylen = len(myitem) |
502 |
myindexlen = len(myindex) |
503 |
startpos = 0 |
504 |
- while ((startpos + 8) < myindexlen): |
505 |
+ while (startpos + 8) < myindexlen: |
506 |
mytestlen = decodeint(myindex[startpos:startpos + 4]) |
507 |
if mytestlen == mylen: |
508 |
if myitem == myindex[startpos + 4:startpos + 4 + mytestlen]: |
509 |
@@ -251,7 +251,7 @@ def xpand(myid, mydest): |
510 |
mydata = myid[1] |
511 |
myindexlen = len(myindex) |
512 |
startpos = 0 |
513 |
- while ((startpos + 8) < myindexlen): |
514 |
+ while (startpos + 8) < myindexlen: |
515 |
namelen = decodeint(myindex[startpos:startpos + 4]) |
516 |
datapos = decodeint(myindex[startpos + 4 + namelen:startpos + 8 + namelen]) |
517 |
datalen = decodeint(myindex[startpos + 8 + namelen:startpos + 12 + namelen]) |
518 |
@@ -439,7 +439,7 @@ class tbz2: |
519 |
if not os.path.exists(mydest): |
520 |
os.makedirs(mydest) |
521 |
startpos = 0 |
522 |
- while ((startpos + 8) < self.indexsize): |
523 |
+ while (startpos + 8) < self.indexsize: |
524 |
namelen = decodeint(self.index[startpos:startpos + 4]) |
525 |
datapos = decodeint(self.index[startpos + 4 + namelen:startpos + 8 + namelen]) |
526 |
datalen = decodeint(self.index[startpos + 8 + namelen:startpos + 12 + namelen]) |
527 |
@@ -472,7 +472,7 @@ class tbz2: |
528 |
encoding=_encodings['fs'], errors='strict'), 'rb') |
529 |
mydata = {} |
530 |
startpos = 0 |
531 |
- while ((startpos + 8) < self.indexsize): |
532 |
+ while (startpos + 8) < self.indexsize: |
533 |
namelen = decodeint(self.index[startpos:startpos + 4]) |
534 |
datapos = decodeint(self.index[startpos + 4 + namelen:startpos + 8 + namelen]) |
535 |
datalen = decodeint(self.index[startpos + 8 + namelen:startpos + 12 + namelen]) |
536 |
|
537 |
diff --git a/pylintrc b/pylintrc |
538 |
index 5f4ec3278..9b0975329 100644 |
539 |
--- a/pylintrc |
540 |
+++ b/pylintrc |
541 |
@@ -23,6 +23,7 @@ enable= |
542 |
redefined-builtin, |
543 |
reimported, |
544 |
relative-beyond-top-level, |
545 |
+ superfluous-parens, |
546 |
trailing-comma-tuple, |
547 |
trailing-newlines, |
548 |
trailing-whitespace, |