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/PRESUBMIT.py b/PRESUBMIT.py
index ef1c987..6571a4e 100644
--- a/PRESUBMIT.py
+++ b/PRESUBMIT.py
@@ -57,15 +57,27 @@
files_to_skip.extend([fnmatch.translate(l) for l in lines if
l and not l.startswith('#')])
disabled_warnings = [
- 'R0401', # Cyclic import
- 'W0613', # Unused argument
+ 'R0401', # Cyclic import
+ 'W0613', # Unused argument
+ 'C0415', # import-outside-toplevel
+ 'R1710', # inconsistent-return-statements
+ 'E1101', # no-member
+ 'E1120', # no-value-for-parameter
+ 'R1708', # stop-iteration-return
+ 'W1510', # subprocess-run-check
+ # Checks which should be re-enabled after Python 2 support is removed.
+ 'R0205', # useless-object-inheritance
+ 'R1725', # super-with-arguments
+ 'W0707', # raise-missing-from
+ 'W1113', # keyword-arg-before-vararg
]
return input_api.RunTests(input_api.canned_checks.GetPylint(
input_api,
output_api,
files_to_check=files_to_check,
files_to_skip=files_to_skip,
- disabled_warnings=disabled_warnings))
+ disabled_warnings=disabled_warnings,
+ version='2.7'), parallel=False)
def CheckRecipes(input_api, output_api):