-
-
Notifications
You must be signed in to change notification settings - Fork 66
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Considering extra config in dotenv source #39
Conversation
Codecov ReportPatch coverage:
📣 This organization is not using Codecov’s GitHub App Integration. We recommend you install it so Codecov can continue to function properly for your repositories. Learn more Additional details and impacted files@@ Coverage Diff @@
## main #39 +/- ##
==========================================
+ Coverage 95.25% 95.37% +0.12%
==========================================
Files 5 5
Lines 295 303 +8
Branches 74 78 +4
==========================================
+ Hits 281 289 +8
Misses 12 12
Partials 2 2
☔ View full report in Codecov by Sentry. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
otherwise seems ok
pydantic_settings/sources.py
Outdated
# As `extra` config is allowed in dotenv settings source, We have to | ||
# update data with extra env variabels from dotenv file. | ||
for k, v in self.env_vars.items(): | ||
if v is not None and k not in data: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why v is not None
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Otherwise test_env_file_none
fails
I've added a commit and changed the logic to handle case insensitive and sub-model |
thanks so much. |
Fixes #11