Conversation
|
When you say not used, is this "not used at all" or "not used in our current pipeline"? Basically, why was it put in originally and can we see a use case for why we would still need it? Also, some tests are failing... I think in src/themefinder/models.py at line 56 you're defining a class Theme that inherits from ValidatedModel, but ValidatedModel is no longer defined at that point in the file. |
quite right re: missing class - ive removed it I meant "not used in our current pipeline", i think it must have been once. The main point im trying to make here is that these methods already exist in pydantic - we dont need to invent our own |
ValidatedModelprovides 4 validation methods:validate_equal_lengthswhich is unusedvalidate_unique_attribute_in_listwhich is unusedvalidate_unique_itemswhich is only used once onlist[str]which can be replaced byset[str]validate_non_empty_fieldswhich is used on lists and str which can be replaced bymax_length=1