scripts/generate-options: fix typing issue

This commit is contained in:
Martin Weinelt
2026-03-15 19:24:49 +01:00
parent 75f9549a81
commit 7dfcb21d35
+5 -1
View File
@@ -55,6 +55,8 @@ def render_option_value(option: Mapping[str, Any], key: str) -> str:
if key not in option: if key not in option:
return "" return ""
value = None
if isinstance(option[key], dict) and "_type" in option[key]: if isinstance(option[key], dict) and "_type" in option[key]:
if option[key]["_type"] == "literalExpression": if option[key]["_type"] == "literalExpression":
# multi-line codeblock # multi-line codeblock
@@ -78,7 +80,9 @@ def render_option_value(option: Mapping[str, Any], key: str) -> str:
else: else:
value = md_literal(text) value = md_literal(text)
return f"- {key}: {value}" # type: ignore assert value is not None
return f"- {key}: {value}"
def print_option(option): def print_option(option):