 Chromium Code Reviews
 Chromium Code Reviews Issue 7104141:
  Use tuple everywhere with explicit conversion.  (Closed) 
  Base URL: svn://svn.chromium.org/chrome/trunk/tools/depot_tools
    
  
    Issue 7104141:
  Use tuple everywhere with explicit conversion.  (Closed) 
  Base URL: svn://svn.chromium.org/chrome/trunk/tools/depot_tools| Index: presubmit_canned_checks.py | 
| diff --git a/presubmit_canned_checks.py b/presubmit_canned_checks.py | 
| index e8bdd3292f593136a0efb0106abd16f175958e90..964688f0a3a1eb0edbb103b0f8df69fe91ee7f69 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$')) | 
| 
Dirk Pranke
2011/06/14 06:28:22
I think you'll want a trailing comma here: ('.*\.p
 
M-A Ruel
2011/06/14 13:05:34
Oops indeed, fixed.
 | 
| + 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\. ' |