Troubles with pydantic models and VSCode and pyright in neovim #989
-
Beta Was this translation helpful? Give feedback.
Answered by
dantownsend
May 16, 2024
Replies: 1 comment 5 replies
-
Yeah, there are limitations when we create Pydantic models dynamically. In my own projects, I tend to use a mix of I've explored added better typing support for One thing we could do instead is have a command - something like |
Beta Was this translation helpful? Give feedback.
5 replies
Answer selected by
strayer
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Yeah, there are limitations when we create Pydantic models dynamically.
In my own projects, I tend to use a mix of
create_pydantic_model
and manually created Pydantic models, depending on the use case.I've explored added better typing support for
create_pydantic_model
, but haven't found a perfect solution.One thing we could do instead is have a command - something like
piccolo models generate
which just outputs amodels.py
file containing the Pydantic models.