scripts/generate-options: fix typing issue
This commit is contained in:
@@ -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):
|
||||
|
||||
Reference in New Issue
Block a user