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

Side by Side Diff: PRESUBMIT.py

Issue 1454433002: Python 3 compatibility Base URL: https://chromium.googlesource.com/external/gyp.git@master
Patch Set: Rebase with master (4ec6c4e3a94bd04a6da2858163d40b2429b8aad1) Created 4 years, 8 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 unified diff | Download patch
« no previous file with comments | « no previous file | buildbot/buildbot_run.py » ('j') | pylib/gyp/MSVSNew.py » ('J')
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 # Copyright (c) 2012 Google Inc. All rights reserved. 1 # Copyright (c) 2012 Google Inc. All rights reserved.
2 # Use of this source code is governed by a BSD-style license that can be 2 # Use of this source code is governed by a BSD-style license that can be
3 # found in the LICENSE file. 3 # found in the LICENSE file.
4 4
5 5
6 """Top-level presubmit script for GYP. 6 """Top-level presubmit script for GYP.
7 7
8 See http://dev.chromium.org/developers/how-tos/depottools/presubmit-scripts 8 See http://dev.chromium.org/developers/how-tos/depottools/presubmit-scripts
9 for more details about the presubmit API built into gcl. 9 for more details about the presubmit API built into gcl.
10 """ 10 """
(...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after
78 report.extend(input_api.canned_checks.PanProjectChecks( 78 report.extend(input_api.canned_checks.PanProjectChecks(
79 input_api, output_api)) 79 input_api, output_api))
80 return report 80 return report
81 81
82 82
83 def CheckChangeOnCommit(input_api, output_api): 83 def CheckChangeOnCommit(input_api, output_api):
84 report = [] 84 report = []
85 85
86 # Accept any year number from 2009 to the current year. 86 # Accept any year number from 2009 to the current year.
87 current_year = int(input_api.time.strftime('%Y')) 87 current_year = int(input_api.time.strftime('%Y'))
88 allowed_years = (str(s) for s in reversed(xrange(2009, current_year + 1))) 88 allowed_years = (str(s) for s in reversed(range(2009, current_year + 1)))
89 years_re = '(' + '|'.join(allowed_years) + ')' 89 years_re = '(' + '|'.join(allowed_years) + ')'
90 90
91 # The (c) is deprecated, but tolerate it until it's removed from all files. 91 # The (c) is deprecated, but tolerate it until it's removed from all files.
92 license = ( 92 license = (
93 r'.*? Copyright (\(c\) )?%(year)s Google Inc\. All rights reserved\.\n' 93 r'.*? Copyright (\(c\) )?%(year)s Google Inc\. All rights reserved\.\n'
94 r'.*? Use of this source code is governed by a BSD-style license that ' 94 r'.*? Use of this source code is governed by a BSD-style license that '
95 r'can be\n' 95 r'can be\n'
96 r'.*? found in the LICENSE file\.\n' 96 r'.*? found in the LICENSE file\.\n'
97 ) % { 97 ) % {
98 'year': years_re, 98 'year': years_re,
(...skipping 29 matching lines...) Expand all
128 'linux_try', 128 'linux_try',
129 'mac_try', 129 'mac_try',
130 'win_try', 130 'win_try',
131 ] 131 ]
132 132
133 133
134 def GetPreferredTryMasters(_, change): 134 def GetPreferredTryMasters(_, change):
135 return { 135 return {
136 'client.gyp': { t: set(['defaulttests']) for t in TRYBOTS }, 136 'client.gyp': { t: set(['defaulttests']) for t in TRYBOTS },
137 } 137 }
OLDNEW
« no previous file with comments | « no previous file | buildbot/buildbot_run.py » ('j') | pylib/gyp/MSVSNew.py » ('J')

Powered by Google App Engine
This is Rietveld 408576698