Possible to support pydantic #1013
-
Would it be possible to provide support for |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
Pyright, the type checker upon which pylance is based, uses standard static type information provided by libraries. It does not (nor do we have any plans to) provide any special casing for third-party libraries like pydantic. We have given some thought to the possibility of creating a way to extend static typing so library authors can specify more dynamic behaviors. This is a significant undertaking, and if it does happen, we need to go through an open specification and standardization process so all type checkers and all libraries benefit. Just to set expectations, this is not something that will happen any time soon. In the meantime, libraries that use dynamic behaviors are not going to work well with static type checking. |
Beta Was this translation helpful? Give feedback.
Pyright, the type checker upon which pylance is based, uses standard static type information provided by libraries. It does not (nor do we have any plans to) provide any special casing for third-party libraries like pydantic.
We have given some thought to the possibility of creating a way to extend static typing so library authors can specify more dynamic behaviors. This is a significant undertaking, and if it does happen, we need to go through an open specification and standardization process so all type checkers and all libraries benefit. Just to set expectations, this is not something that will happen any time soon.
In the meantime, libraries that use dynamic behaviors are not going to…