Replies: 1 comment 2 replies
|
As a rule, pyright has no hard-coded knowledge about any third-party libraries. The behavior you're describing here, where an assignment to an instance variable results in a runtime error, is specific to pydantic. As such, this isn't a behavior that pyright (or any standards-compliant type checker) would report as an error. Pyright does support Thankfully, this error should be easy to find and diagnose the first time you run your code, so static analysis doesn't add much value here. |
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment

Uh oh!
There was an error while loading. Please reload this page.
I would like to prevent typos in pydantic model attributes and catch them by Pyright.
Example
If I run
It will crash
Is there a way to configure Pyright to catch and report such issues?
These are my current settings:
All reactions