Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1389)

Unified Diff: presubmit_canned_checks.py

Issue 4360002: Largely reduce the number of pylint warnings and fix one typo. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/tools/depot_tools
Patch Set: address comments Created 10 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « git_cl_hooks.py ('k') | presubmit_support.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: presubmit_canned_checks.py
diff --git a/presubmit_canned_checks.py b/presubmit_canned_checks.py
index 52d93b4fba926ddd95853d4c1e53d3de02722491..e470dc7c818b4d05a41a076a3a7629c2ee85b28b 100644
--- a/presubmit_canned_checks.py
+++ b/presubmit_canned_checks.py
@@ -275,11 +275,11 @@ def CheckLongLines(input_api, output_api, maxlen=80, source_file_filter=None):
return []
-def CheckLicense(input_api, output_api, license, source_file_filter=None,
+def CheckLicense(input_api, output_api, license_re, source_file_filter=None,
accept_empty_files=True):
"""Verifies the license header.
"""
- license_re = input_api.re.compile(license, input_api.re.MULTILINE)
+ license_re = input_api.re.compile(license_re, input_api.re.MULTILINE)
bad_files = []
for f in input_api.AffectedSourceFiles(source_file_filter):
contents = input_api.ReadFile(f, 'rb')
@@ -483,7 +483,7 @@ def CheckRietveldTryJobExecution(input_api, output_api, host_url, platforms,
for platform in platforms:
values.setdefault(platform, ['not started', ''])
message = None
- non_success = [k.upper() for k,v in values.iteritems() if v[0] != 'success']
+ non_success = [k.upper() for k, v in values.iteritems() if v[0] != 'success']
if 'failure' in [v[0] for v in values.itervalues()]:
message = 'Try job failures on %s!\n' % ', '.join(non_success)
elif non_success:
« no previous file with comments | « git_cl_hooks.py ('k') | presubmit_support.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698