Skip to content

Don't spit env vars if env_nested_delimiter=None #535

@gsakkis

Description

@gsakkis

By default env_nested_delimiter=None but this value is not special-cased, leading to surprising (if not ourtight buggy) behavior with case_sensitive=True:

    class Subsettings(BaseSettings):
        foo: str

    class Settings(BaseSettings):
        subsettings: Subsettings

        model_config = SettingsConfigDict(case_sensitive=True)

    env.set('subsettingsNonefoo', 'abc')
    s = Settings()
    assert s.subsettings.foo == 'abc'

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions