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: I4b8f8fc521386419a3121bbb07edc8ac83170a94
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/3413679
Reviewed-by: Josip Sokcevic <sokcevic@google.com>
Commit-Queue: Aravind Vasudevan <aravindvasudev@google.com>
diff --git a/autoninja.py b/autoninja.py
index 4be1083..28f9ff3 100755
--- a/autoninja.py
+++ b/autoninja.py
@@ -51,7 +51,7 @@
   elif arg.startswith('-C'):
     # Support -Cout/Default
     output_dir = arg[2:]
-  elif arg == '-o' or arg == '--offline':
+  elif arg in ('-o', '--offline'):
     offline = True
   elif arg == '-h':
     print('autoninja: Use -o/--offline to temporary disable goma.',
@@ -59,7 +59,7 @@
     print(file=sys.stderr)
 
 # Strip -o/--offline so ninja doesn't see them.
-input_args = [ arg for arg in input_args if arg != '-o' and arg != '--offline']
+input_args = [ arg for arg in input_args if arg not in ('-o', '--offline')]
 
 use_goma = False
 use_remoteexec = False