diff --git a/scripts/generate-options.py b/scripts/generate-options.py index abfc6fc..c195504 100644 --- a/scripts/generate-options.py +++ b/scripts/generate-options.py @@ -55,6 +55,8 @@ def render_option_value(option: Mapping[str, Any], key: str) -> str: if key not in option: return "" + value = None + if isinstance(option[key], dict) and "_type" in option[key]: if option[key]["_type"] == "literalExpression": # multi-line codeblock @@ -78,7 +80,9 @@ def render_option_value(option: Mapping[str, Any], key: str) -> str: else: value = md_literal(text) - return f"- {key}: {value}" # type: ignore + assert value is not None + + return f"- {key}: {value}" def print_option(option):