Skip to content

Commit 201c3c3

Browse files
committed
Workaround note.
1 parent 5472547 commit 201c3c3

File tree

1 file changed

+6
-0
lines changed
  • pydantic_settings/sources/providers

1 file changed

+6
-0
lines changed

pydantic_settings/sources/providers/cli.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -494,6 +494,8 @@ def _load_env_vars(
494494
for field_name, val in list(parsed_args.items()):
495495
if isinstance(val, list):
496496
if self._is_nested_alias_path_only_workaround(parsed_args, field_name, val):
497+
# Workaround for nested alias path environment variables not being handled.
498+
# See https://github.com/pydantic/pydantic-settings/issues/670
497499
continue
498500
parsed_args[field_name] = self._merge_parsed_list(val, field_name)
499501
elif field_name.endswith(':subcommand') and val is not None:
@@ -529,6 +531,10 @@ def _load_env_vars(
529531
def _is_nested_alias_path_only_workaround(
530532
self, parsed_args: dict[str, list[str] | str], field_name: str, val: list[str]
531533
) -> bool:
534+
"""
535+
Workaround for nested alias path environment variables not being handled.
536+
See https://github.com/pydantic/pydantic-settings/issues/670
537+
"""
532538
known_arg = self._parser_map[field_name].values()
533539
if not known_arg:
534540
return False

0 commit comments

Comments
 (0)