diff options
author | David Pursehouse <david.pursehouse@sonymobile.com> | 2012-10-11 16:44:48 +0900 |
---|---|---|
committer | David Pursehouse <david.pursehouse@sonymobile.com> | 2012-10-22 12:30:14 +0900 |
commit | 5c6eeac8f0350fd6b14cf226ffcff655f1dd9582 (patch) | |
tree | 3225695b9d2a97342a49127717ea5e2bc5935a63 /subcmds/forall.py | |
parent | e98607248eec2b149d84efe944c12cbef419b82e (diff) | |
download | git-repo-5c6eeac8f0350fd6b14cf226ffcff655f1dd9582.tar.gz |
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
Diffstat (limited to 'subcmds/forall.py')
-rw-r--r-- | subcmds/forall.py | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/subcmds/forall.py b/subcmds/forall.py index 76a02688..2ece95ed 100644 --- a/subcmds/forall.py +++ b/subcmds/forall.py | |||
@@ -141,12 +141,16 @@ terminal and are not redirected. | |||
141 | for cn in cmd[1:]: | 141 | for cn in cmd[1:]: |
142 | if not cn.startswith('-'): | 142 | if not cn.startswith('-'): |
143 | break | 143 | break |
144 | if cn in _CAN_COLOR: | 144 | else: |
145 | cn = None | ||
146 | # pylint: disable-msg=W0631 | ||
147 | if cn and cn in _CAN_COLOR: | ||
145 | class ColorCmd(Coloring): | 148 | class ColorCmd(Coloring): |
146 | def __init__(self, config, cmd): | 149 | def __init__(self, config, cmd): |
147 | Coloring.__init__(self, config, cmd) | 150 | Coloring.__init__(self, config, cmd) |
148 | if ColorCmd(self.manifest.manifestProject.config, cn).is_on: | 151 | if ColorCmd(self.manifest.manifestProject.config, cn).is_on: |
149 | cmd.insert(cmd.index(cn) + 1, '--color') | 152 | cmd.insert(cmd.index(cn) + 1, '--color') |
153 | # pylint: enable-msg=W0631 | ||
150 | 154 | ||
151 | mirror = self.manifest.IsMirror | 155 | mirror = self.manifest.IsMirror |
152 | out = ForallColoring(self.manifest.manifestProject.config) | 156 | out = ForallColoring(self.manifest.manifestProject.config) |