Closed nateraw closed 2 years ago
Right now, in my PR (#5 ) I'm using dataclasses. I could add a __post_init__
and do validation there potentially.
I would do a card.validate()
kinda thing where we do the validation, and yeah we probably don't wanna use pydantic
.
Closing this and moving the conversation to #2
How do we want to deal with card data validation? Dataclasses are a great way to give type hints, but they don't do any validation. Is this a complex enough use case to use
pydantic
? I think it would make our lives easier, but I'm concerned the dependency won't be welcomed inhuggingface_hub
if this code gets integrated there down the line.CC @adrinjalali