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 /command.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 'command.py')
-rw-r--r-- | command.py | 7 |
1 files changed, 7 insertions, 0 deletions
@@ -123,6 +123,11 @@ class Command(object): | |||
123 | result.sort(key=_getpath) | 123 | result.sort(key=_getpath) |
124 | return result | 124 | return result |
125 | 125 | ||
126 | # pylint: disable-msg=W0223 | ||
127 | # Pylint warns that the `InteractiveCommand` and `PagedCommand` classes do not | ||
128 | # override method `Execute` which is abstract in `Command`. Since that method | ||
129 | # is always implemented in classes derived from `InteractiveCommand` and | ||
130 | # `PagedCommand`, this warning can be suppressed. | ||
126 | class InteractiveCommand(Command): | 131 | class InteractiveCommand(Command): |
127 | """Command which requires user interaction on the tty and | 132 | """Command which requires user interaction on the tty and |
128 | must not run within a pager, even if the user asks to. | 133 | must not run within a pager, even if the user asks to. |
@@ -137,6 +142,8 @@ class PagedCommand(Command): | |||
137 | def WantPager(self, opt): | 142 | def WantPager(self, opt): |
138 | return True | 143 | return True |
139 | 144 | ||
145 | # pylint: enable-msg=W0223 | ||
146 | |||
140 | class MirrorSafeCommand(object): | 147 | class MirrorSafeCommand(object): |
141 | """Command permits itself to run within a mirror, | 148 | """Command permits itself to run within a mirror, |
142 | and does not require a working directory. | 149 | and does not require a working directory. |