From 7dfcb21d35a4e8de09b38d822a0e0b7d64d61192 Mon Sep 17 00:00:00 2001 From: Martin Weinelt Date: Sun, 15 Mar 2026 19:24:49 +0100 Subject: [PATCH] scripts/generate-options: fix typing issue --- scripts/generate-options.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) 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):