Skip to content

Commit

Permalink
SomeOf validator: class signature
Browse files Browse the repository at this point in the history
  • Loading branch information
guyarad committed Dec 6, 2017
1 parent 9a33635 commit ef97726
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion voluptuous/validators.py
Original file line number Diff line number Diff line change
Expand Up @@ -960,7 +960,9 @@ class SomeOf(object):
... validate(6.2)
"""

def __init__(self, min_valid, validators, max_valid=None, **kwargs):
def __init__(self, validators, min_valid=None, max_valid=None, **kwargs):
assert min_valid is not None or max_valid is not None, \
'when using "%s" you should specify at least one of min_valid and max_valid' % (type(self).__name__,)
self.min_valid = min_valid or 0
self.max_valid = max_valid or len(validators)
self.validators = validators
Expand Down

0 comments on commit ef97726

Please sign in to comment.