Open b4nst opened 8 years ago
I suspect a copy/paste mistake in module validator, on the le and _less_than_orequal comparator dict. Currently it's :
validator
COMPARATORS = { 'count_eq': lambda x, y: safe_length(x) == y, 'lt': operator.lt, 'less_than': operator.lt, 'le': operator.lt, 'less_than_or_equal': operator.lt, 'eq': operator.eq, 'equals': operator.eq, 'str_eq': lambda x, y: operator.eq(str(x), str(y)), 'ne': operator.ne, 'not_equals': operator.ne, 'ge': operator.ge, 'greater_than_or_equal': operator.ge, 'gt': operator.gt, 'greater_than': operator.gt, 'contains': lambda x, y: x and operator.contains(x, y), # is y in x 'contained_by': lambda x, y: y and operator.contains(y, x), # is x in y 'regex': lambda x, y: regex_compare(str(x), str(y)), 'type': lambda x, y: test_type(x, y) }
Shouldn't it be :
COMPARATORS = { 'count_eq': lambda x, y: safe_length(x) == y, 'lt': operator.lt, 'less_than': operator.lt, 'le': operator.le, 'less_than_or_equal': operator.le, 'eq': operator.eq, 'equals': operator.eq, 'str_eq': lambda x, y: operator.eq(str(x), str(y)), 'ne': operator.ne, 'not_equals': operator.ne, 'ge': operator.ge, 'greater_than_or_equal': operator.ge, 'gt': operator.gt, 'greater_than': operator.gt, 'contains': lambda x, y: x and operator.contains(x, y), # is y in x 'contained_by': lambda x, y: y and operator.contains(y, x), # is x in y 'regex': lambda x, y: regex_compare(str(x), str(y)), 'type': lambda x, y: test_type(x, y) }
I suspect a copy/paste mistake in module
validator
, on the le and _less_than_orequal comparator dict. Currently it's :Shouldn't it be :