-
-
Notifications
You must be signed in to change notification settings - Fork 115
fixed load nested config from env #723
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
base: main
Are you sure you want to change the base?
Conversation
|
Thanks @Sube-py for the PR. |
|
@hramezani plz check. |
| # export my_prefix_llm__embeddings__openai__keys='["sk-..."]' | ||
| # export my_prefix_llm__embeddings__qwen__keys='["sk-..."]' |
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.
we don't need this comment
| # export my_prefix_llm__embeddings__openai__keys='["sk-..."]' | |
| # export my_prefix_llm__embeddings__qwen__keys='["sk-..."]' |
| from pydantic_settings import BaseSettings, SettingsConfigDict | ||
|
|
||
|
|
||
| def test_env_source_when_load_multi_nested_config(env): |
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.
please move the test to tests/test_settings.py. you can put it at the end of file. env related tests are there
Thanks @Sube-py please check the comments |
When using environment variables to override multi-level configurations, an error will occur if the configuration is of a complex type.
Reproduce code: