bisect-kit: fix pylint errors
Besides normal fixes, BisectorCommandLineInterface is renamed to
BisectorCommandLine. Although new version of pylint no longer complain
interface-not-implemented (instead, saying the disable option is
undefined), chromite and depot_tools still use the old one. Renaming is
easier to avoid the annoyingness.
BUG=chromium:776314
TEST=cros lint *.py bisect_kit/*.py
Change-Id: I4cf3f63ee950d913a6b3f5b6a7a7b59810066963
Reviewed-on: https://chromium-review.googlesource.com/987660
Commit-Ready: Kuang-che Wu <kcwu@chromium.org>
Tested-by: Kuang-che Wu <kcwu@chromium.org>
Reviewed-by: Kuang-che Wu <kcwu@chromium.org>
diff --git a/bisect_kit/cli.py b/bisect_kit/cli.py
index fa21ac3..84a6642 100644
--- a/bisect_kit/cli.py
+++ b/bisect_kit/cli.py
@@ -133,8 +133,7 @@
try:
if m:
return argtype(m.group(1)), int(m.group(2))
- else:
- return argtype(s), 1
+ return argtype(s), 1
except ArgTypeError as e:
# It should be okay to gives multiplier example only for the first one
# because it is just "example", no need to enumerate all possibilities.
@@ -297,14 +296,13 @@
return None
-# This is not an python "interface". pylint: disable=interface-not-implemented
-class BisectorCommandLineInterface(object):
+class BisectorCommandLine(object):
"""Bisector command line interface.
The typical usage pattern:
if __name__ == '__main__':
- BisectorCommandLineInterface(CustomDomain).main()
+ BisectorCommandLine(CustomDomain).main()
where CustomDomain is a derived class of core.BisectDomain. See
bisect-list.py as example.
@@ -376,7 +374,6 @@
status: Execution result ('old', 'new', or 'skip').
values: Collected values from eval step. None if last step is 'switch'.
"""
- idx = self.states.rev2idx(rev)
if prev_rev != rev:
logger.debug('switch to rev=%s', rev)
t0 = time.time()