-
Notifications
You must be signed in to change notification settings - Fork 7
New issue
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
Add support for validating objects with a to_dict method #23
Add support for validating objects with a to_dict method #23
Conversation
Hi @jacobtomlinson - I'm definitely happy with the idea of this PR, and once the test suite passes I'll merge it. I don't know enough mypy to be able to offer suggestions for fixes, unfortunately! |
Thanks @willthames. I think I've made mypy happy now. |
Using |
ok, now the updates are failing flake8 tests, but that should be very simple to fix up. |
Gah so sorry. Pushed another commit. |
Thanks @jacobtomlinson , I'll sort a new 1.28 release shortly |
1.28.1 is now released |
Awesome thanks @willthames! |
I added an example of using |
Thanks for the useful library!
Some other libraries such as
kubernetes
,kubernetes-asyncio
,kr8s
andlightkube
all have objects that can represent Kubernetes resources, and all of those objects have ato_dict()
method. This PR adds support for those objects to be passed directly intokubernetes_validate.validate()
.