Skip to content

Commit

Permalink
Merge pull request #4 from Vitor-Avila/small-nit
Browse files Browse the repository at this point in the history
small nit
  • Loading branch information
Vitor-Avila committed May 21, 2023
2 parents e3df8cf + f558638 commit 0e85232
Showing 1 changed file with 10 additions and 8 deletions.
18 changes: 10 additions & 8 deletions src/preset_cli/cli/superset/sync/native/command.py
Original file line number Diff line number Diff line change
Expand Up @@ -188,17 +188,19 @@ def native( # pylint: disable=too-many-locals, too-many-arguments, too-many-bra
if path_name.is_dir() and not path_name.stem.startswith("."):
queue.extend(path_name.glob("*"))
elif is_yaml_config(relative_path):
if disable_jinja_templating:
config = load_yaml(path_name)
else:
config = render_yaml(path_name, env)
config = (
load_yaml(path_name)
if disable_jinja_templating
else render_yaml(path_name, env)
)

overrides_path = path_name.with_suffix(".overrides" + path_name.suffix)
if overrides_path.exists():
if disable_jinja_templating:
overrides = load_yaml(overrides_path)
else:
overrides = render_yaml(overrides_path, env)
overrides = (
load_yaml(overrides_path)
if disable_jinja_templating
else render_yaml(overrides_path, env)
)
dict_merge(config, overrides)

config["is_managed_externally"] = disallow_edits
Expand Down

0 comments on commit 0e85232

Please sign in to comment.