Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork2.2k
Make__signature__
a lazy property, do not deepcopy defaults#10818
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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
Uh oh!
There was an error while loading.Please reload this page.
Conversation
Also follow stdlib dataclasses for signature parameter defaults.If a default factory is used, the placeholder `'<factory>'` isused.
cloudflare-workers-and-pagesbot commentedNov 11, 2024 • edited
Loading Uh oh!
There was an error while loading.Please reload this page.
edited
Uh oh!
There was an error while loading.Please reload this page.
Deploying pydantic-docs with |
Latest commit: | fda5e91 |
Status: | ✅ Deploy successful! |
Preview URL: | https://232345cd.pydantic-docs.pages.dev |
Branch Preview URL: | https://model-signature.pydantic-docs.pages.dev |
codspeed-hqbot commentedNov 11, 2024 • edited
Loading Uh oh!
There was an error while loading.Please reload this page.
edited
Uh oh!
There was an error while loading.Please reload this page.
CodSpeed Performance ReportMerging#10818 willimprove performances by 11.23%Comparing Summary
Benchmarks breakdown
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
This is promising - are there more class attributes for which we could do this? Gives us a nice boost on schema builds :)
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
Coverage reportClick to see where and how coverage changed
This report was generated bypython-coverage-comment-action |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
Very impressed with this implementation, good find.
Feel free to merge at your leisure.
2899ca8
intomainUh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
Also follow stdlib dataclasses for signature parameter defaults. If a default factory is used, the placeholder
'<factory>'
is used.Related issue number
Fixes#10771,#10656
Checklist