Skip to content

Feature/simplify pydantic#69

Closed
gecBurton wants to merge 7 commits intomainfrom
feature/simplify-pydantic
Closed

Feature/simplify pydantic#69
gecBurton wants to merge 7 commits intomainfrom
feature/simplify-pydantic

Conversation

@gecBurton
Copy link
Contributor

@gecBurton gecBurton commented Jan 20, 2026

ValidatedModel provides 4 validation methods:

  • validate_equal_lengths which is unused
  • validate_unique_attribute_in_list which is unused
  • validate_unique_items which is only used once on list[str] which can be replaced by set[str]
  • validate_non_empty_fields which is used on lists and str which can be replaced by max_length=1

@MoFrod
Copy link
Contributor

MoFrod commented Jan 20, 2026

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.

@gecBurton
Copy link
Contributor Author

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

@gecBurton gecBurton closed this Mar 6, 2026
@gecBurton gecBurton deleted the feature/simplify-pydantic branch March 6, 2026 11:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants