Replies: 2 comments
-
|
💬 Your Product Feedback Has Been Submitted 🎉 Thank you for taking the time to share your insights with us! Your feedback is invaluable as we build a better GitHub experience for all our users. Here's what you can expect moving forward ⏩
Where to look to see what's shipping 👀
What you can do in the meantime 💻
As a member of the GitHub community, your participation is essential. While we can't promise that every suggestion will be implemented, we want to emphasize that your feedback is instrumental in guiding our decisions and priorities. Thank you once again for your contribution to making GitHub even better! We're grateful for your ongoing support and collaboration in shaping the future of our platform. ⭐ |
Beta Was this translation helpful? Give feedback.
-
|
I can confirm this behavior — I’m seeing the same false-positive warning with Pydantic v2 and pydantic-settings in VS Code using Pylance. The environment variables load correctly at runtime, but Pylance still reports missing arguments for fields defined in the model. It seems like Pylance doesn’t recognize the .env injection mechanism and expects explicit parameters in the constructor. Temporary workaround: Hopefully, this can be improved in a future Pylance update to better support Pydantic’s settings model initialization. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Select Topic Area
Bug
Body
When using Pydantic v2 and pydantic-settings, VS Code’s Pylance type checker shows a false-positive warning:
even though the values are correctly loaded from the .env file at runtime and the Settings object initializes without error.
🧠 Expected Behavior
No Pylance warnings — Settings() should be recognized as valid even without explicit arguments since .env values are loaded automatically.
Beta Was this translation helpful? Give feedback.
All reactions