I noticed some issues with Annotated so am replacing it for the custom type.
Namely, I realized setting __name__ on an Annotated type was really really bad and we were doing that here and I can't remember so rather than undo and break it, replacing it this approach maintains the behaviors and doesn't have all the bad things.
How I did it
some way we do any custom pydantic type; using their weird hooks
How to verify it
tests still pass
Checklist
[ ] Passes all linting checks (pre-commit and CI jobs)
[ ] New test cases have been added and are passing
[ ] Documentation has been updated
[ ] PR title follows Conventional Commit standard (will be automatically included in the changelog)
What I did
I noticed some issues with Annotated so am replacing it for the custom type. Namely, I realized setting
__name__
on an Annotated type was really really bad and we were doing that here and I can't remember so rather than undo and break it, replacing it this approach maintains the behaviors and doesn't have all the bad things.How I did it
some way we do any custom pydantic type; using their weird hooks
How to verify it
tests still pass
Checklist