-
-
Notifications
You must be signed in to change notification settings - Fork 61
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
Add support for adding config through class kwargs #112
Conversation
Codecov ReportPatch coverage:
Additional details and impacted files@@ Coverage Diff @@
## main #112 +/- ##
==========================================
+ Coverage 97.42% 97.44% +0.01%
==========================================
Files 5 5
Lines 311 313 +2
Branches 68 68
==========================================
+ Hits 303 305 +2
Misses 6 6
Partials 2 2
☔ View full report in Codecov by Sentry. |
please review |
pydantic_settings/main.py
Outdated
# Extend config_keys by pydantic settings config keys to | ||
# support setting config through class kwargs. | ||
config_keys |= set(SettingsConfigDict.__annotations__.keys()) |
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.
This seems super magical... Can you add a reference to the pydantic code that we are using here?
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.
I improved the comment and explained it more by mentioning the class and method name that the magic happen there on Pydantic.
Please let me know by comment or suggestion if you think it is not clear yet.
Which release is this going with? @hramezani |
Next release will happen soon and this will be included |
Closes #110
Selected Reviewer: @dmontagu