Skip to content

Commit

Permalink
Improve the comment
Browse files Browse the repository at this point in the history
  • Loading branch information
hramezani committed Jul 7, 2023
1 parent 11d591c commit 79c186d
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion pydantic_settings/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,12 @@ class SettingsConfigDict(ConfigDict, total=False):
secrets_dir: str | Path | None


# Extend config_keys by pydantic settings config keys to
# Extend `config_keys` by pydantic settings config keys to
# support setting config through class kwargs.
# Pydantic uses `config_keys` in `pydantic._internal._config.ConfigWrapper.for_model`
# to extract config keys from model kwargs, So, by adding pydantic settings keys to
# `config_keys`, they will be considered as valid config keys and will be collected
# by Pydantic.
config_keys |= set(SettingsConfigDict.__annotations__.keys())


Expand Down

0 comments on commit 79c186d

Please sign in to comment.