Re:Python type hints may not be not for me in practice
by tasn on Wednesday November 27, 2024 @02:49PM
(#42259099)
My info is maybe a bit dated, as it's been a while since we wrote this hackery. We also adopted SQLModel at some point but we had to patch it to work well (I think some of my contributions are now in upstream). As for some of the hacks:
Added types ourselves to the base model like this:
Added functions that help with typing like this: and stuff like this for relationships: I hope this helps, I don't have time to find all the stuff, but we also hacked on SQLAlchemy a bit, and in other places.