We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
x = attr.ib(validator=instance_of(list)) is IMO not a very useful check, but x = attr.ib(validator=list_of(type)) would be.
x = attr.ib(validator=instance_of(list))
x = attr.ib(validator=list_of(type))
In a similar fashion we could also add a dict_of(key_type, val_type) validator.
dict_of(key_type, val_type)
I can create a pull request if you like this idea.
The text was updated successfully, but these errors were encountered:
We’re getting this request regularly. You may want to look into the discussion around #158 to what I’m envisioning if you’d like to supply a solution.
Sorry, something went wrong.
No branches or pull requests
x = attr.ib(validator=instance_of(list))
is IMO not a very useful check, butx = attr.ib(validator=list_of(type))
would be.In a similar fashion we could also add a
dict_of(key_type, val_type)
validator.I can create a pull request if you like this idea.
The text was updated successfully, but these errors were encountered: