Skip to content

Commit

Permalink
Adds sketch of improving extract_fields with typeddict
Browse files Browse the repository at this point in the history
This in response to #1252.

We should be able to handle typeddict better.

This sketches some ideas:

1. field validation should happen in .validate() not the constructor.
2. extract_fields shouldn't need fields if the typeddict is the annotation type.
3. we properly check that typeddict can be a return type.
  • Loading branch information
skrawcz committed Dec 7, 2024
1 parent 2d0746b commit 413c282
Show file tree
Hide file tree
Showing 2 changed files with 372 additions and 4 deletions.
Loading

0 comments on commit 413c282

Please sign in to comment.