Commit f23524d9 authored by dtu@chromium.org's avatar dtu@chromium.org

Revert of Add extensions parameter to Pylint presubmit check. (patchset #1...

Revert of Add extensions parameter to Pylint presubmit check. (patchset #1 id:1 of https://codereview.chromium.org/1639493003/ )

Reason for revert:
Sorry, turns out this change isn't necessary. You can specify extension-pkg-whitelist in pylintrc.

Original issue's description:
> Add extensions parameter to Pylint presubmit check.
> 
> This allows Pylint to analyze code that relies on C extensions (like numpy).
> https://bitbucket.org/logilab/pylint/issues/58#comment-14920640
> 
> 
> BUG=
> 
> Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=298392

TBR=dpranke@chromium.org
# Not skipping CQ checks because original CL landed more than 1 days ago.
BUG=

Review URL: https://codereview.chromium.org/1646633002

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@298419 0039d316-1c4b-4281-b951-d872f2087c98
parent 93aa0739
......@@ -694,8 +694,7 @@ def _FetchAllFiles(input_api, white_list, black_list):
def GetPylint(input_api, output_api, white_list=None, black_list=None,
disabled_warnings=None, extra_paths_list=None, extensions=None,
pylintrc=None):
disabled_warnings=None, extra_paths_list=None, pylintrc=None):
"""Run pylint on python files.
The default white_list enforces looking only at *.py files.
......@@ -730,16 +729,11 @@ def GetPylint(input_api, output_api, white_list=None, black_list=None,
input_api.logging.info('Skipping pylint: no matching changes.')
return []
extra_args = []
if extensions:
extra_args.append('--extension-pkg-whitelist=' + ','.join(extensions))
if pylintrc is not None:
pylintrc = input_api.os_path.join(input_api.PresubmitLocalPath(), pylintrc)
else:
pylintrc = input_api.os_path.join(_HERE, 'pylintrc')
extra_args.append('--rcfile=%s' % pylintrc)
extra_args = ['--rcfile=%s' % pylintrc]
if disabled_warnings:
extra_args.extend(['-d', ','.join(disabled_warnings)])
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment