Revert "Extract shared named style constant and use keyword args"
This reverts commit 00796f39c6.
This commit is contained in:
@@ -9,7 +9,7 @@ import logging
|
||||
from typing import Dict, Any, List, Tuple, Optional
|
||||
from urllib.parse import urlparse
|
||||
|
||||
from gdocs.docs_helpers import validate_operation, VALID_NAMED_STYLE_TYPES
|
||||
from gdocs.docs_helpers import validate_operation
|
||||
|
||||
logger = logging.getLogger(__name__)
|
||||
|
||||
@@ -317,10 +317,15 @@ class ValidationManager:
|
||||
)
|
||||
|
||||
if named_style_type is not None:
|
||||
if named_style_type not in VALID_NAMED_STYLE_TYPES:
|
||||
valid_styles = [
|
||||
"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 (
|
||||
False,
|
||||
f"Invalid named_style_type '{named_style_type}'. Must be one of: {', '.join(VALID_NAMED_STYLE_TYPES)}",
|
||||
f"Invalid named_style_type '{named_style_type}'. Must be one of: {', '.join(valid_styles)}",
|
||||
)
|
||||
|
||||
if heading_level is not None:
|
||||
|
||||
Reference in New Issue
Block a user