maksimzayats · GitHub

and others added 2 commits

January 19, 2023 17:43
This 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 jcrist changed the title Fix json.schema of NewType Support arbitrarily nested NewType/ Annotated types

Jan 21, 2023

@jcrist

Read the original on github.com ↗