More coding style cleanup
Fixing more issues found with pylint. Some that were supposed to
have been fixed in the previous sweep (Ie0db839e) but were missed:
C0321: More than one statement on a single line
W0622: Redefining built-in 'name'
And some more:
W0631: Using possibly undefined loop variable 'name'
W0223: Method 'name' is abstract in class 'name' but is not overridden
W0231: __init__ method from base class 'name' is not called
Change-Id: Ie119183708609d6279e973057a385fde864230c3
diff --git a/subcmds/forall.py b/subcmds/forall.py
index 76a0268..2ece95e 100644
--- a/subcmds/forall.py
+++ b/subcmds/forall.py
@@ -141,12 +141,16 @@
for cn in cmd[1:]:
if not cn.startswith('-'):
break
- if cn in _CAN_COLOR:
+ else:
+ cn = None
+ # pylint: disable-msg=W0631
+ if cn and cn in _CAN_COLOR:
class ColorCmd(Coloring):
def __init__(self, config, cmd):
Coloring.__init__(self, config, cmd)
if ColorCmd(self.manifest.manifestProject.config, cn).is_on:
cmd.insert(cmd.index(cn) + 1, '--color')
+ # pylint: enable-msg=W0631
mirror = self.manifest.IsMirror
out = ForallColoring(self.manifest.manifestProject.config)