bisect-kit: fix pylint warnings

Follow chromite's new pylint rules. This CL fixes the trivial ones. More
fixes will come later.

BUG=None
TEST=cros lint

Change-Id: I18bfce6f8cb43bf29ebc3d5af1c5604ecdf50d49
Reviewed-on: https://chromium-review.googlesource.com/1772797
Tested-by: Kuang-che Wu <kcwu@chromium.org>
Commit-Ready: Kuang-che Wu <kcwu@chromium.org>
Commit-Ready: Zheng-Jie Chang <zjchang@google.com>
Legacy-Commit-Queue: Commit Bot <commit-bot@chromium.org>
Reviewed-by: Kuang-che Wu <kcwu@chromium.org>
Reviewed-by: Zheng-Jie Chang <zjchang@google.com>
diff --git a/bisect_kit/codechange.py b/bisect_kit/codechange.py
index b70f0a2..554f2a6 100644
--- a/bisect_kit/codechange.py
+++ b/bisect_kit/codechange.py
@@ -752,7 +752,7 @@
     if ideal_index is not None:
       candidates.append(ideal_index)
     if begin is not None:
-      candidates.extend(range(begin, end + 1))
+      candidates.extend(list(range(begin, end + 1)))
     if not candidates:
       logger.error('unable to match %s: all specs are after it', target.name)
       return None
@@ -923,7 +923,7 @@
     if not os.path.exists(cache_dir):
       os.makedirs(cache_dir)
     cache_filename = os.path.join(cache_dir, '%s,%s.json' % (old, new))
-    with file(cache_filename, 'w') as fp:
+    with open(cache_filename, 'w') as fp:
       json.dump(data, fp, indent=4, sort_keys=True)
 
   def load_action_groups_between_releases(self, old, new):
@@ -934,7 +934,7 @@
           'cached revlist not found: %s' % cache_filename)
 
     result = []
-    for data in json.load(file(cache_filename)):
+    for data in json.load(open(cache_filename)):
       result.append(ActionGroup.unserialize(data))
 
     return result