From 7a262eba201a30fbb82c4a034f5cebe21734ffa4 Mon Sep 17 00:00:00 2001 From: Dirk Pranke Date: Wed, 4 Aug 2021 17:00:27 +0000 Subject: [PATCH] Fix pylint canned check for pylint-2.6. We were attempting to run pylint-2.6 with python2, when it needs to be run with python3. I'm not sure how we haven't noticed this before now. Bug: 1157676 Change-Id: I60fc22a805c20649d04f7d0f53c828a0db41e8e7 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/3068833 Reviewed-by: Josip Sokcevic Reviewed-by: Peter Wen Commit-Queue: Dirk Pranke --- presubmit_canned_checks.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/presubmit_canned_checks.py b/presubmit_canned_checks.py index 16f7fc1d2e..ae809599db 100644 --- a/presubmit_canned_checks.py +++ b/presubmit_canned_checks.py @@ -932,6 +932,7 @@ def GetPylint(input_api, extra_paths_list = extra_paths_list or [] assert version in ('1.5', '2.6'), 'Unsupported pylint version: ' + version + python3 = (version == '2.6') if input_api.is_committing: error_type = output_api.PresubmitError @@ -1018,7 +1019,8 @@ def GetPylint(input_api, name='Pylint (%s)' % description, cmd=cmd, kwargs=kwargs, - message=error_type) + message=error_type, + python3=python3) # Always run pylint and pass it all the py files at once. # Passing py files one at time is slower and can produce