-
Notifications
You must be signed in to change notification settings - Fork 6
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
feat(pydantic): allow pydantic model instances as defaults (#64) #65
feat(pydantic): allow pydantic model instances as defaults (#64) #65
Conversation
96ad35e
to
4725889
Compare
linting fails because black and flake8 have a different opinion on how
should be formatted. black now wants to do:
But flake8 then complains that there are multiple statements on one line. |
So this flake8 vs black conflict. Is there a way that we can configure either of the tools to handle this OK? |
I guess this comment makes sense: psf/black#4213 (comment) TLDR; |
Got you, so that should be a change in |
Looks like it, should I add this here? |
Had some issue with mypy as well, fixed in same commit. |
Love it! Are we good to merge? |
I am okay with it, but since I removed it lists of pydantic objects will not yet work. I'll open a new issue for this or a second PR later. |
Understood. Many thanks for this contribution. |
Thanks for making this fix! Unfortunately, I'm stuck on py-avro-schema v2 (and upgrading is going to be very hard I'm afraid). Any suggestions on how I could try and patch v2 or work around this issue? I tried patching the make_default logic into v2, but it doesn't seem to work unfortunately... Any hints would be highly appreciated 🙏 |
NVM. Gotten it to work and posted it for others here: #64 (comment) |
This allows pydantic BaseModels as default values.
Fixes #64