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

Unified Diff: presubmit_canned_checks.py

Issue 7104141: Use tuple everywhere with explicit conversion. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/tools/depot_tools
Patch Set: fix tuple Created 9 years, 6 months 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 | « no previous file | tests/presubmit_unittest.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 e8bdd3292f593136a0efb0106abd16f175958e90..469578e885b1f274c1810483fa8fff2b691e7c10 100644
--- a/presubmit_canned_checks.py
+++ b/presubmit_canned_checks.py
@@ -576,8 +576,8 @@ def RunPylint(input_api, output_api, white_list=None, black_list=None):
The default white_list enforces looking only a *.py files.
"""
- white_list = white_list or ['.*\.py$']
- black_list = black_list or input_api.DEFAULT_BLACK_LIST
+ white_list = tuple(white_list or ('.*\.py$',))
+ black_list = tuple(black_list or input_api.DEFAULT_BLACK_LIST)
if input_api.is_committing:
error_type = output_api.PresubmitError
else:
@@ -846,11 +846,11 @@ def PanProjectChecks(input_api, output_api,
Returns:
A list of warning or error objects.
"""
- excluded_paths = excluded_paths or tuple()
- text_files = text_files or (
+ excluded_paths = tuple(excluded_paths or [])
+ text_files = tuple(text_files or (
r'.+\.txt$',
r'.+\.json$',
- )
+ ))
project_name = project_name or 'Chromium'
license_header = license_header or (
r'.*? Copyright \(c\) %(year)s The %(project)s Authors\. '
« no previous file with comments | « no previous file | tests/presubmit_unittest.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698