Use pylint 2.7 for depot_tools

This includes a few fixes for specific errors, and disables several new
warnings introduced in this version, in order to allow for an incremental migration.

Bug:1262286
Change-Id: Ie97d686748c9c952e87718a65f401c5f6f80a5c9
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/3400616
Reviewed-by: Gavin Mak <gavinmak@google.com>
Commit-Queue: Aravind Vasudevan <aravindvasudev@google.com>
diff --git a/git_map.py b/git_map.py
index e8d4513..d7514a4 100755
--- a/git_map.py
+++ b/git_map.py
@@ -31,6 +31,7 @@
 
 if sys.version_info.major == 2:
   # On Python 3, BrokenPipeError is raised instead.
+  # pylint:disable=redefined-builtin
   BrokenPipeError = IOError
 
 
@@ -68,7 +69,7 @@
 
 
 def _color_branch(branch, all_branches, all_tags, current):
-  if branch == current or branch == 'HEAD -> ' + current:
+  if branch in (current, 'HEAD -> ' + current):
     color = CYAN
     current = None
   elif branch in all_branches: