pydantic / pydantic-settings

Settings management using pydantic
https://docs.pydantic.dev/latest/usage/pydantic_settings/
MIT License
508 stars 50 forks source link

fix: a second level of environment nesting expected a dict #281

Closed diefans closed 2 months ago

diefans commented 2 months ago

When there was a second/deeper level of environment variable nesting another part of the code raised an exception.

This PR completely fixes #275

I do not know, if I should create a new issue for that?

Overall the fixes seem like a hack to me and IMHO the implementation of explode_env_vars is somehow like "putting the cart before the horse", since it is driven by the environment vars nested reality and not driven by the pydantic model annotations...

hramezani commented 2 months ago

Thanks @diefans

No need to create a new issue