From 5c6eeac8f0350fd6b14cf226ffcff655f1dd9582 Mon Sep 17 00:00:00 2001 From: David Pursehouse Date: Thu, 11 Oct 2012 16:44:48 +0900 Subject: 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 --- command.py | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'command.py') diff --git a/command.py b/command.py index e17f0ab9..5a5f468f 100644 --- a/command.py +++ b/command.py @@ -123,6 +123,11 @@ class Command(object): 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 @@ class PagedCommand(Command): 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. -- cgit v1.2.3-54-g00ecf