Centralize formatter route metadata
This commit is contained in:
@@ -5,15 +5,15 @@ from typing import Any
|
||||
|
||||
try:
|
||||
from . import caption_policy
|
||||
from . import category_template_metadata as template_metadata_policy
|
||||
from . import formatter_input as input_policy
|
||||
from . import krea_cast as cast_policy
|
||||
from . import route_metadata as route_metadata_policy
|
||||
from .prompt_hygiene import sanitize_prose_text
|
||||
except ImportError: # Allows local smoke tests with `python -c`.
|
||||
import caption_policy
|
||||
import category_template_metadata as template_metadata_policy
|
||||
import formatter_input as input_policy
|
||||
import krea_cast as cast_policy
|
||||
import route_metadata as route_metadata_policy
|
||||
from prompt_hygiene import sanitize_prose_text
|
||||
|
||||
|
||||
@@ -73,7 +73,7 @@ def _formatter_hint_parts(row: dict[str, Any]) -> list[str]:
|
||||
hints: list[str] = []
|
||||
if not isinstance(row, dict):
|
||||
return hints
|
||||
for hint in template_metadata_policy.formatter_hints_for_route(row, "caption"):
|
||||
for hint in route_metadata_policy.row_formatter_hints(row, "caption"):
|
||||
hint = _clean_text(hint).strip(" .")
|
||||
if hint and hint not in hints:
|
||||
hints.append(hint)
|
||||
|
||||
Reference in New Issue
Block a user