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

Side by Side Diff: appengine/components/components/config/validation.py

Issue 2013943002: Changing license header, again! (Closed) Base URL: git@github.com:luci/luci-py.git@master
Patch Set: Fixed third parties Created 4 years, 7 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
OLDNEW
1 # Copyright 2015 The LUCI Authors. All rights reserved. 1 # Copyright 2015 The LUCI Authors. All rights reserved.
2 # Use of this source code is governed by the Apache v2.0 license that can be 2 # Use of this source code is governed under the Apache License, Version 2.0
3 # found in the LICENSE file. 3 # that can be found in the LICENSE file.
4 4
5 """Defines validation rules for configuration files. 5 """Defines validation rules for configuration files.
6 6
7 Configurations requested with store_last_good=True are automatically validated 7 Configurations requested with store_last_good=True are automatically validated
8 against rules defined using this module. Otherwise, validation.is_defined_for 8 against rules defined using this module. Otherwise, validation.is_defined_for
9 and validation.validate can be used to validate configs in your code. 9 and validation.validate can be used to validate configs in your code.
10 10
11 Example: 11 Example:
12 12
13 # Configs foo.cfg in all project config sets must be valid protobuf messages. 13 # Configs foo.cfg in all project config sets must be valid protobuf messages.
(...skipping 296 matching lines...) Expand 10 before | Expand all | Expand 10 after
310 try: 310 try:
311 regex = re.compile(value) 311 regex = re.compile(value)
312 except re.error as ex: 312 except re.error as ex:
313 raise ValueError(ex.message) 313 raise ValueError(ex.message)
314 return regex.match 314 return regex.match
315 315
316 raise ValueError('Invalid pattern kind: %s' % kind) 316 raise ValueError('Invalid pattern kind: %s' % kind)
317 317
318 318
319 DEFAULT_RULE_SET = RuleSet() 319 DEFAULT_RULE_SET = RuleSet()
OLDNEW
« no previous file with comments | « appengine/components/components/config/test_config.proto ('k') | appengine/components/components/config/validation_context.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698