Skip to content

Troubles with pydantic models and VSCode and pyright in neovim #989

Answered by dantownsend
strayer asked this question in Q&A
Discussion options

You must be logged in to vote

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 a models.py file containing the Pydantic models.

Replies: 1 comment 5 replies

Comment options

You must be logged in to vote
5 replies
@strayer
Comment options

@strayer
Comment options

@dantownsend
Comment options

@strayer
Comment options

@dantownsend
Comment options

Answer selected by strayer
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants