Merge pull request #8 from DeterminateSystems/fix-boolean-handling-in-template

Fix rendering of Booleans
This commit is contained in:
Luc Perkins 2025-05-15 16:35:48 -04:00 committed by GitHub
commit 9d0d462c4f
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 13 additions and 6 deletions

View file

@ -16,12 +16,19 @@ def make_inputs_table(inputs):
required = input_options.get("required", False)
default = input_options.get("default")
if isinstance(default, bool):
default_str = f"`{str(default).lower()}`"
elif default is not None:
default_str = f"`{default}`"
else:
default_str = ""
rows.append(
[
f"`{input_name}`",
input_options["description"],
"📍" if required else "",
f"`{default}`" if default is not None else "",
default_str,
]
)