-
-
Notifications
You must be signed in to change notification settings - Fork 287
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Allow merge_unique on lists when merge_enabled=True
Fix #726
- Loading branch information
1 parent
cacfa29
commit 7eeeb7b
Showing
4 changed files
with
32 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
from __future__ import annotations | ||
|
||
from dynaconf import Dynaconf | ||
|
||
settings = Dynaconf( | ||
envvar_prefix="ISSUE726", | ||
settings_files=["defaults.yaml", "configuration.yaml"], | ||
merge_enabled=True, | ||
) | ||
|
||
|
||
assert settings.config_key.nested_list == [ | ||
"item_a", | ||
"item_b", | ||
"item_c", | ||
], settings.config_key.nested_list |
6 changes: 6 additions & 0 deletions
6
tests_functional/issues/726_unique_nested_list/configuration.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
config_key: | ||
nested_list: | ||
- dynaconf_merge_unique | ||
- item_a | ||
- item_b | ||
- item_c |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
config_key: | ||
nested_list: | ||
- item_a | ||
- item_b |