wrongly reports missing parameter for pydantic_settings's BaseSettings #8917
Unanswered
braindevices
asked this question in
Q&A
Replies: 1 comment
-
Pyright is a standards-compliant type checker, and it has no special knowledge of pydantic or other libraries outside of the stdlib. It bases its type analysis on the type information provided by libraries. Pydantic uses the Are you sure that the above code works? When I run it, I receive an exception on the same line where pyright reports an error — and for the same apparent reason that pyright is indicating. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Is this a bug?
When using pydantic Settings the member without default is valid and can be set by other config source.
But the pyright report
error: Argument missing for parameter "b" (reportCallIssue)
Same code can pass mypy without issue.
Code or Screenshots
VS Code extension or command-line
command-line tool pyright 1.1.379
Beta Was this translation helpful? Give feedback.
All reactions