Skip to content

Commit

Permalink
fix: fix boolean parsing in temp yaml creation
Browse files Browse the repository at this point in the history
  • Loading branch information
ejseqera committed Oct 18, 2023
1 parent c9333b4 commit 1a54083
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion seqerakit/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,10 @@ def quoted_str_representer(dumper, data):
return dumper.represent_scalar("tag:yaml.org,2002:str", data, style='"')

yaml.add_representer(quoted_str, quoted_str_representer)
params_dict = {k: os.path.expandvars(v) for k, v in params_dict.items()}
params_dict = {
k: quoted_str(os.path.expandvars(v)) if isinstance(v, str) else v
for k, v in params_dict.items()
}

with tempfile.NamedTemporaryFile(
mode="w", delete=False, suffix=".yaml"
Expand Down

0 comments on commit 1a54083

Please sign in to comment.