Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/master' into nightly
Browse files Browse the repository at this point in the history
  • Loading branch information
Overhang.IO committed Sep 5, 2023
2 parents 14dfc82 + 8eccaa6 commit 6941021
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
- [Bugfix] Render config settings that are inside lists. (by @regisb)
1 change: 1 addition & 0 deletions tests/test_env.py
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,7 @@ def test_render_unknown(self) -> None:
}
self.assertEqual("ab", env.render_unknown(config, "{{ var1 }}b"))
self.assertEqual({"x": "ac"}, env.render_unknown(config, {"x": "{{ var1 }}c"}))
self.assertEqual(["x", "ac"], env.render_unknown(config, ["x", "{{ var1 }}c"]))

def test_common_domain(self) -> None:
self.assertEqual(
Expand Down
2 changes: 2 additions & 0 deletions tutor/env.py
Original file line number Diff line number Diff line change
Expand Up @@ -376,6 +376,8 @@ def render_unknown(config: Config, value: t.Any) -> t.Any:
return render_str(config, value)
if isinstance(value, dict):
return {k: render_unknown(config, v) for k, v in value.items()}
if isinstance(value, list):
return [render_unknown(config, v) for v in value]
return value


Expand Down

0 comments on commit 6941021

Please sign in to comment.