Commit 6df90f32 authored by nednguyen@google.com's avatar nednguyen@google.com

Allows python line with pylint: disable=line-too-long to have more than 120 chars.

BUG=564100

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@297765 0039d316-1c4b-4281-b951-d872f2087c98
parent c1bb56e7
......@@ -342,6 +342,11 @@ def CheckLongLines(input_api, output_api, maxlen, source_file_filter=None):
if any((url in line) for url in ('file://', 'http://', 'https://')):
return True
# If 'line-too-long' is explictly suppressed for the line, any length is
# acceptable.
if 'pylint: disable=line-too-long' in line and file_extension == 'py':
return True
if line_len > extra_maxlen:
return False
......@@ -351,9 +356,6 @@ def CheckLongLines(input_api, output_api, maxlen, source_file_filter=None):
if '<include' in line and file_extension in ('css', 'html', 'js'):
return True
if 'pylint: disable=line-too-long' in line and file_extension == 'py':
return True
return input_api.re.match(
r'.*[A-Za-z][A-Za-z_0-9]{%d,}.*' % long_symbol, line)
......
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