Added trafaret
argument to DataError
constructor and made _failure
a method (rather than static method)
Added Subclass
trafaret.
Fixed loading contrib modules, so now original contrib module loading exception will be raised on contrib Trafaret access.
Added value
option to internal _failure interface, and option value
to DataError.as_dict
method.
Fixed Key default behaviour for Dict with allowed extra when names are the same in Key and in data source
Fixed Email validator
Renamed methods to check_value
and check_and_return
.
Added Tuple
trafaret.
Fixed Dict(...).make_optional(...) method for a chaining support
Updated KeysSubSet
errors propagation - now you can return error either
{'a': DataError('message')}
, or DataError({'a': 'message'})
Added __call__
alias to check
.
Added visitor
module.
Fixed Dict.allow_extra
behaviour.
Int
will not convert not-rounded floats like 2.2
Dict
have .ignore_extra
method, similar to .allow_extra
, but given keys
will not included to result dict. If you will provide *
, any extra will be ignored.