-
-
Notifications
You must be signed in to change notification settings - Fork 2.2k
Add __pydantic_on_complete__() hook that is called once model is fully ready to be used
#11762
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
Conversation
CodSpeed Performance ReportMerging #11762 will not alter performanceComparing Summary
|
Coverage reportClick to see where and how coverage changed
This report was generated by python-coverage-comment-action |
||||||||||||||||||||||||||||||||||||
0c9ec0f to
3b263a7
Compare
…ready to be used # Conflicts: # pydantic/_internal/_model_construction.py # pydantic/main.py
3b263a7 to
05762dd
Compare
|
@Viicos Please review! |
|
I just realized we have a Lines 586 to 588 in bce81ef
That one’s name can be overridden through an attribute on Lines 191 to 192 in bce81ef
Maybe we should follow that pattern for the new hook? Edit: If we were creating a model instance level hook, we should probably follow that pattern. But the new hook we're implementing here is more similar to the subclass hook and related to other dunder properties we already set, so I think the current approach is acceptable. |
__pydantic_on_complete__() hook that is called once model is fully ready to be used
Change Summary
Builds on #11759, to be merged after that.
Related issue number
Part of #11453.
Checklist
Selected Reviewer: @sydney-runkle