ruff
This commit is contained in:
@@ -138,9 +138,15 @@ def build_paragraph_style(
|
||||
|
||||
if named_style_type is not None:
|
||||
valid_styles = [
|
||||
"NORMAL_TEXT", "TITLE", "SUBTITLE",
|
||||
"HEADING_1", "HEADING_2", "HEADING_3",
|
||||
"HEADING_4", "HEADING_5", "HEADING_6",
|
||||
"NORMAL_TEXT",
|
||||
"TITLE",
|
||||
"SUBTITLE",
|
||||
"HEADING_1",
|
||||
"HEADING_2",
|
||||
"HEADING_3",
|
||||
"HEADING_4",
|
||||
"HEADING_5",
|
||||
"HEADING_6",
|
||||
]
|
||||
if named_style_type not in valid_styles:
|
||||
raise ValueError(
|
||||
|
||||
@@ -325,7 +325,9 @@ class BatchOperationManager:
|
||||
tab_id,
|
||||
)
|
||||
style = "bulleted" if list_type == "UNORDERED" else "numbered"
|
||||
description = f"create {style} list {op['start_index']}-{op['end_index']}"
|
||||
description = (
|
||||
f"create {style} list {op['start_index']}-{op['end_index']}"
|
||||
)
|
||||
if op.get("nesting_level"):
|
||||
description += f" (nesting level {op['nesting_level']})"
|
||||
|
||||
@@ -491,7 +493,11 @@ class BatchOperationManager:
|
||||
},
|
||||
"create_bullet_list": {
|
||||
"required": ["start_index", "end_index"],
|
||||
"optional": ["list_type", "nesting_level", "paragraph_start_indices"],
|
||||
"optional": [
|
||||
"list_type",
|
||||
"nesting_level",
|
||||
"paragraph_start_indices",
|
||||
],
|
||||
"description": "Apply or remove native bullet/numbered list formatting (list_type: UNORDERED, ORDERED, or NONE to remove; nesting_level: 0-8)",
|
||||
},
|
||||
"insert_doc_tab": {
|
||||
|
||||
@@ -318,9 +318,15 @@ class ValidationManager:
|
||||
|
||||
if named_style_type is not None:
|
||||
valid_styles = [
|
||||
"NORMAL_TEXT", "TITLE", "SUBTITLE",
|
||||
"HEADING_1", "HEADING_2", "HEADING_3",
|
||||
"HEADING_4", "HEADING_5", "HEADING_6",
|
||||
"NORMAL_TEXT",
|
||||
"TITLE",
|
||||
"SUBTITLE",
|
||||
"HEADING_1",
|
||||
"HEADING_2",
|
||||
"HEADING_3",
|
||||
"HEADING_4",
|
||||
"HEADING_5",
|
||||
"HEADING_6",
|
||||
]
|
||||
if named_style_type not in valid_styles:
|
||||
return (
|
||||
|
||||
Reference in New Issue
Block a user