aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAaron Bauman <bman@gentoo.org>2020-08-06 00:05:20 -0400
committerZac Medico <zmedico@gentoo.org>2020-08-05 23:06:07 -0700
commit897be5c2874ed3edda7b3af84e6ddb34c3095b71 (patch)
tree008fc34961b232d0ce57c102de0e93a81622e7b4 /lib/_emerge
parentpylintrc: enable multiple-imports check (diff)
downloadportage-897be5c2874ed3edda7b3af84e6ddb34c3095b71.tar.gz
portage-897be5c2874ed3edda7b3af84e6ddb34c3095b71.tar.bz2
portage-897be5c2874ed3edda7b3af84e6ddb34c3095b71.zip
lib/*: fix superfluous-parens and enable check
Signed-off-by: Aaron Bauman <bman@gentoo.org> Signed-off-by: Zac Medico <zmedico@gentoo.org>
Diffstat (limited to 'lib/_emerge')
-rw-r--r--lib/_emerge/actions.py14
-rw-r--r--lib/_emerge/resolver/slot_collision.py4
-rw-r--r--lib/_emerge/stdout_spinner.py2
-rw-r--r--lib/_emerge/unmerge.py4
4 files changed, 12 insertions, 12 deletions
diff --git a/lib/_emerge/actions.py b/lib/_emerge/actions.py
index 43e9de43a..7d2d9b315 100644
--- a/lib/_emerge/actions.py
+++ b/lib/_emerge/actions.py
@@ -333,7 +333,7 @@ def action_build(emerge_config, trees=DeprecationWarning,
return 1
else:
- if ("--resume" in myopts):
+ if "--resume" in myopts:
print(darkgreen("emerge: It seems we have nothing to resume..."))
return os.EX_OK
@@ -450,7 +450,7 @@ def action_build(emerge_config, trees=DeprecationWarning,
myopts.pop("--ask", None)
if ("--pretend" in myopts) and not ("--fetchonly" in myopts or "--fetch-all-uri" in myopts):
- if ("--resume" in myopts):
+ if "--resume" in myopts:
mymergelist = mydepgraph.altlist()
if len(mymergelist) == 0:
print(colorize("INFORM", "emerge: It seems we have nothing to resume..."))
@@ -522,7 +522,7 @@ def action_build(emerge_config, trees=DeprecationWarning,
level=logging.ERROR, noiselevel=-1)
return 1
- if ("--resume" in myopts):
+ if "--resume" in myopts:
favorites=mtimedb["resume"]["favorites"]
else:
@@ -2319,7 +2319,7 @@ def adjust_config(myopts, settings):
settings.backup_changes("PORTAGE_VERBOSE")
# Set so that configs will be merged regardless of remembered status
- if ("--noconfmem" in myopts):
+ if "--noconfmem" in myopts:
settings["NOCONFMEM"]="1"
settings.backup_changes("NOCONFMEM")
@@ -2424,7 +2424,7 @@ def getportageversion(portdir, _unused, profile, chost, vardb):
if profilever is None:
try:
profilever = "!" + os.readlink(profile)
- except (OSError):
+ except OSError:
pass
if profilever is None:
@@ -3057,7 +3057,7 @@ def run_action(emerge_config):
level=logging.ERROR, noiselevel=-1)
return 1
- if ("--quiet" in emerge_config.opts):
+ if "--quiet" in emerge_config.opts:
spinner.update = spinner.update_quiet
portage.util.noiselimit = -1
@@ -3085,7 +3085,7 @@ def run_action(emerge_config):
if "python-trace" in emerge_config.target_config.settings.features:
portage.debug.set_trace(True)
- if not ("--quiet" in emerge_config.opts):
+ if not "--quiet" in emerge_config.opts:
if '--nospinner' in emerge_config.opts or \
emerge_config.target_config.settings.get('TERM') == 'dumb' or \
not sys.stdout.isatty():
diff --git a/lib/_emerge/resolver/slot_collision.py b/lib/_emerge/resolver/slot_collision.py
index 7536ce7a2..df3816717 100644
--- a/lib/_emerge/resolver/slot_collision.py
+++ b/lib/_emerge/resolver/slot_collision.py
@@ -138,8 +138,8 @@ class slot_conflict_handler:
config_gen = _configuration_generator(conflict_pkgs)
first_config = True
- #go through all configurations and collect solutions
- while(True):
+ # Go through all configurations and collect solutions
+ while True:
config = config_gen.get_configuration()
if not config:
break
diff --git a/lib/_emerge/stdout_spinner.py b/lib/_emerge/stdout_spinner.py
index 26592b7b0..70e132683 100644
--- a/lib/_emerge/stdout_spinner.py
+++ b/lib/_emerge/stdout_spinner.py
@@ -65,7 +65,7 @@ class stdout_spinner:
def update_scroll(self):
if self._return_early():
return True
- if(self.spinpos >= len(self.scroll_sequence)):
+ if self.spinpos >= len(self.scroll_sequence):
sys.stdout.write(darkgreen(" \b\b\b" + self.scroll_sequence[
len(self.scroll_sequence) - 1 - (self.spinpos % len(self.scroll_sequence))]))
else:
diff --git a/lib/_emerge/unmerge.py b/lib/_emerge/unmerge.py
index 5204ac6f0..548edaf0c 100644
--- a/lib/_emerge/unmerge.py
+++ b/lib/_emerge/unmerge.py
@@ -168,7 +168,7 @@ def _unmerge_display(root_config, myopts, unmerge_action,
"="+"/".join(sp_absx[sp_vdb_len:]))
newline=""
- if (not "--quiet" in myopts):
+ if not "--quiet" in myopts:
newline="\n"
if settings["ROOT"] != "/":
writemsg_level(darkgreen(newline+ \
@@ -176,7 +176,7 @@ def _unmerge_display(root_config, myopts, unmerge_action,
settings["ROOT"]))
if (("--pretend" in myopts) or ("--ask" in myopts)) and \
- not ("--quiet" in myopts):
+ not "--quiet" in myopts:
writemsg_level(darkgreen(newline+\
">>> These are the packages that would be unmerged:\n"))