vrs-python icon indicating copy to clipboard operation
vrs-python copied to clipboard

Create hashable BaseModel subclass in order to enforce uniqueItems with Set annotation

Open theferrit32 opened this issue 2 years ago • 3 comments

We just need to define what to use as the hash value that will work across all the models.

https://github.com/pydantic/pydantic/issues/1303#issuecomment-599712964

@ahwagner if are going to go ahead with making every object digestible in the model and serialize algorithm, that could be a good solution to this, we can just use those digests. (with a special case for custom root types with a non-pydantic type as their root, like IRI being a str)

theferrit32 avatar Aug 02 '23 20:08 theferrit32

This issue was marked stale due to inactivity.

github-actions[bot] avatar Oct 02 '23 02:10 github-actions[bot]

This issue was marked stale due to inactivity.

github-actions[bot] avatar Dec 05 '23 02:12 github-actions[bot]

@theferrit32 I think this is done here. If you agree, we can close

korikuzma avatar Jul 10 '24 11:07 korikuzma