Migrate to Pydantic v2#2695
Conversation
According to their docs, it looks like a wildcard will do the job. |
Ah nice, thanks. |
0c3a858 to
a3128ba
Compare
395b51d to
804925c
Compare
804925c to
3a279b3
Compare
shtlrs
left a comment
There was a problem hiding this comment.
Great work.
Would you like to do the same thing as 3a279b3 for Colours and Emojis, I don't think these are things that anyone will ever configure, i don't even see the use of configuring them. (Might as well look into other classes that we ourselves do not quite setup)
I didn't touch colours as it has the validator, but that just seems to convert hexstrings into ints, so that might be something we can move to a basic class. Emojis needs to stay he same way as it is, mostly for the trash & incidents emojis. |
238c9b4 to
37cfc4c
Compare
https://docs.pydantic.dev/latest/migration/#changes-to-handling-of-standard-types > While union types will still attempt validation of each choice from left to right, they now preserve the type of the input whenever possible, even if the correct type is not the first choice for which the input would pass validation
37cfc4c to
97fa616
Compare

Summary
All commits starting with
breaking:are breaking changes from Pydantic and will be squashed into 1 commit before merging. (Hence the do not merge tag)Other commits are kaizen style commits that I noticed while working on this PR.
This will be far easier to review commit-by-commit.
Todo:
Squash commits before merging