Merge pull request #15509 from brave/issues/25517-pylint
Update presubmit pylint check to use proper configuration.
This commit is contained in:
@@ -12,7 +12,7 @@ extension-pkg-allow-list=
|
||||
extension-pkg-whitelist=
|
||||
|
||||
# Specify a score threshold to be exceeded before program exits with error.
|
||||
fail-under=1.0
|
||||
fail-under=10.0
|
||||
|
||||
# Files or directories to be skipped. They should be base names, not paths.
|
||||
ignore=CVS
|
||||
|
||||
+12
-3
@@ -3,6 +3,9 @@
|
||||
# License, v. 2.0. If a copy of the MPL was not distributed with this file,
|
||||
# You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||
|
||||
import os
|
||||
import sys
|
||||
|
||||
USE_PYTHON3 = True
|
||||
PRESUBMIT_VERSION = '2.0.0'
|
||||
|
||||
@@ -14,6 +17,12 @@ def CheckChangeLintsClean(input_api, output_api):
|
||||
|
||||
|
||||
def CheckPylint(input_api, output_api):
|
||||
return input_api.canned_checks.RunPylint(input_api,
|
||||
output_api,
|
||||
version='2.7')
|
||||
extra_paths_list = os.environ['PYTHONPATH'].split(';' if sys.platform ==
|
||||
'win32' else ':')
|
||||
return input_api.canned_checks.RunPylint(
|
||||
input_api,
|
||||
output_api,
|
||||
pylintrc=input_api.os_path.join(input_api.PresubmitLocalPath(),
|
||||
'.pylintrc'),
|
||||
extra_paths_list=extra_paths_list,
|
||||
version='2.7')
|
||||
|
||||
Reference in New Issue
Block a user