and others added 2 commits
January 19, 2023 17:43This adds support for nesting `Annotated`/`NewType` wrappers in any combination. Previously you could only nest: - `Annotated[Annotated[...], ...]` (the `Annotated` constructor automatically flattens this, no need for `msgspec` to handle this case. - `Annotated[NewType(...), ...]` It also refactors the type processing code in `_core.c` to be a little cleaner (still not "clean", Python type annotations aren't the easiest objects to consume).
jcrist
changed the title
Fix
Support arbitrarily nested json.schema of NewTypeNewType/ Annotated types