Skip to content

Commit

Permalink
Merge pull request #9 from LamaAni/fix_environment_parse
Browse files Browse the repository at this point in the history
Fix environment parse
  • Loading branch information
LamaAni authored May 27, 2022
2 parents db6d95a + 8cab257 commit 2f33150
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 1 deletion.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@ The following keywords are reserved (default values presented)
settings:
inherit: False # If true, allow inherit parent folders.
inherit_siblings: True # If true allow inherit configuration files in the same source directory.
allow_imports: True # If false dose not allow imports.
use_deep_merge: True # Merge configurations via deep merge. If false, Only root keys are merged (and overwritten)
concatenate_lists: True # When merging, append the merged list to the current one.
imports:
Expand Down
4 changes: 4 additions & 0 deletions bole/config/built_in.py
Original file line number Diff line number Diff line change
Expand Up @@ -81,3 +81,7 @@ def use_deep_merge(self) -> bool:
def concatenate_lists(self) -> bool:
"""If true, merged lists will be appended"""
return self.get("concatenate_lists", True)

@property
def allow_imports(self) -> bool:
return self.get("allow_imports", True)
2 changes: 1 addition & 1 deletion bole/config/cascading.py
Original file line number Diff line number Diff line change
Expand Up @@ -222,7 +222,7 @@ def __load_siblings(
config.initialize()

if load_imports:
if config.settings.inherit:
if config.settings.allow_imports:
# if the config has imports they should come before it.
configs += cls.__load_siblings(
imports=config.config_imports,
Expand Down

0 comments on commit 2f33150

Please sign in to comment.