-
-
Notifications
You must be signed in to change notification settings - Fork 2.2k
Allow ellipsis on Fields inside Annotated #3133
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
The usecase is TypedDicts, which can't have default values otherwise. Meaning that adding Optionals to Annotated drops them from the list of required fields, which the patch fixes.
Clarifies what's required with TypedDicts schemas.
|
please review. I don't think this needs documentation changes (in fact documentation does not cover not allowing ellipses on annotated fields, since this is an edge case). |
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.
Otherwise LGTM.
Almost scary how small this change was 😕
|
please update. |
should be done (dunno how to remove the "needs author revision" tag) |
As per the note in the body of this PR, you can just add "please review". I'm looking now. |
|
Good catch, thanks so much. |
Change Summary
Allow ellipsis on Fields inside Annotated.
The usecase is TypedDicts, which can't have default values otherwise.
Meaning that adding Optionals to Annotated drops them from the list of
required fields, which the patch fixes.
I believe the change is minor enough to not deserve its own issue.
Checklist
changes/<pull request or issue id>-<github username>.mdfile added describing change(see changes/README.md for details)