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/git_common.py b/git_common.py
index 54e65e8..0a984ae 100644
--- a/git_common.py
+++ b/git_common.py
@@ -46,6 +46,7 @@
if sys.version_info.major == 2:
# On Python 3, BrokenPipeError is raised instead.
+ # pylint:disable=redefined-builtin
BrokenPipeError = IOError
@@ -874,7 +875,7 @@
while c != b'':
c = stream.read(1)
if c in (None, b'', b'\0'):
- if len(acc.getvalue()):
+ if len(acc.getvalue()) > 0:
yield acc.getvalue()
acc = BytesIO()
else: