Closed ShT3ch closed 6 years ago
Since it is too late to fix this in 1.x, I will check for Iterable in next release.
Meanwhile you can use something like t.Type(tuple) & list & t.List(t.Int)
.
It will check that we have a tuple, then convert to list and now t.List can work.
Hello. Here the case.
Maintainers of aiozmq library recommend to use trafaret for type checking. But also aiozmq's internals convert all lists to tuples while passing messages for RPC.
Trafaret's tuples take implicit types as parameter, but I'm not able just to receive tuple instead of list using trafaret.
For example:
raises an error
DataError: {0: DataError(value must contain 1 items)}
I'm not able to use
trafaret.List
too. It checksisinstance(obj, list)
.Can you suggest some workaround?