Closed jacobtomlinson closed 10 months ago
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 Any
felt like cheating here so on second thoughts I made a protocol instead, I've not done that before so that was a fun learning experience. mypy is happy for me locally so hopefully CI will be happy now.
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 kubernetes-validate
to the kr8s documentation too.
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()
.