ApeWorX / ethpm-types

Implementation of EIP-2678
Apache License 2.0
14 stars 8 forks source link

fix: replace Annotated with custom type for PackageName #109

Closed antazoey closed 9 months ago

antazoey commented 9 months ago

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