mirror of
https://github.com/pre-commit/pre-commit.git
synced 2026-02-17 08:14:42 +04:00
Python 3 compatibility.
This commit is contained in:
parent
ddebb83a40
commit
bb365a6e68
10 changed files with 30 additions and 27 deletions
|
|
@ -21,7 +21,7 @@ def extend_validator_cls(validator_cls, modify):
|
|||
|
||||
|
||||
def default_values(properties, instance):
|
||||
for property, subschema in properties.iteritems():
|
||||
for property, subschema in properties.items():
|
||||
if 'default' in subschema:
|
||||
instance.setdefault(
|
||||
property, copy.deepcopy(subschema['default']),
|
||||
|
|
@ -29,7 +29,7 @@ def default_values(properties, instance):
|
|||
|
||||
|
||||
def remove_default_values(properties, instance):
|
||||
for property, subschema in properties.iteritems():
|
||||
for property, subschema in properties.items():
|
||||
if (
|
||||
'default' in subschema and
|
||||
instance.get(property) == subschema['default']
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue