Centralize formatter route metadata
This commit is contained in:
+5
-5
@@ -5,7 +5,7 @@ from typing import Any
|
||||
|
||||
try:
|
||||
from . import formatter_input as input_policy
|
||||
from . import category_template_metadata as template_metadata_policy
|
||||
from . import route_metadata as route_metadata_policy
|
||||
from .krea_action_context import (
|
||||
is_close_foreplay_text as _is_close_foreplay_text,
|
||||
is_outercourse_text as _is_outercourse_text,
|
||||
@@ -36,7 +36,7 @@ try:
|
||||
from .prompt_hygiene import sanitize_negative_text, sanitize_prose_text
|
||||
except ImportError: # Allows local smoke tests with `python -c`.
|
||||
import formatter_input as input_policy
|
||||
import category_template_metadata as template_metadata_policy
|
||||
import route_metadata as route_metadata_policy
|
||||
from krea_action_context import (
|
||||
is_close_foreplay_text as _is_close_foreplay_text,
|
||||
is_outercourse_text as _is_outercourse_text,
|
||||
@@ -109,7 +109,7 @@ def _formatter_hint_parts(*rows: dict[str, Any]) -> list[str]:
|
||||
for row in rows:
|
||||
if not isinstance(row, dict):
|
||||
continue
|
||||
for hint in template_metadata_policy.formatter_hints_for_route(row, "krea"):
|
||||
for hint in route_metadata_policy.row_formatter_hints(row, "krea"):
|
||||
hint = _clean(hint).strip(" .")
|
||||
if hint and hint not in hints:
|
||||
hints.append(hint)
|
||||
@@ -465,7 +465,7 @@ def _normal_row_to_krea(row: dict[str, Any], detail_level: str, style_mode: str)
|
||||
source_composition,
|
||||
axis_values,
|
||||
detail_density,
|
||||
row.get("action_family"),
|
||||
route_metadata_policy.row_action_family(row),
|
||||
)
|
||||
action = _pov_action_phrase(action, pov_labels, role_graph, item, source_composition, axis_values, detail_density)
|
||||
output_composition = _pov_composition_text(composition, pov_labels)
|
||||
@@ -597,7 +597,7 @@ def _insta_pair_to_krea(row: dict[str, Any], detail_level: str, style_mode: str)
|
||||
hard_source_composition,
|
||||
hard_axis_values,
|
||||
hard_detail_density,
|
||||
hard.get("action_family") or row.get("action_family"),
|
||||
route_metadata_policy.row_action_family(hard) or route_metadata_policy.row_action_family(row),
|
||||
)
|
||||
hard_action = _pov_action_phrase(
|
||||
hard_action,
|
||||
|
||||
Reference in New Issue
Block a user