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/command.py b/command.py
index e17f0ab..5a5f468 100644
--- a/command.py
+++ b/command.py
@@ -123,6 +123,11 @@
result.sort(key=_getpath)
return result
+# pylint: disable-msg=W0223
+# Pylint warns that the `InteractiveCommand` and `PagedCommand` classes do not
+# override method `Execute` which is abstract in `Command`. Since that method
+# is always implemented in classes derived from `InteractiveCommand` and
+# `PagedCommand`, this warning can be suppressed.
class InteractiveCommand(Command):
"""Command which requires user interaction on the tty and
must not run within a pager, even if the user asks to.
@@ -137,6 +142,8 @@
def WantPager(self, opt):
return True
+# pylint: enable-msg=W0223
+
class MirrorSafeCommand(object):
"""Command permits itself to run within a mirror,
and does not require a working directory.