Use shared item axis context in role routes

This commit is contained in:
2026-06-27 18:18:47 +02:00
parent 867916ee51
commit 6a65f7d35c
11 changed files with 100 additions and 52 deletions
+6 -7
View File
@@ -3,15 +3,14 @@ from __future__ import annotations
import re
from typing import Any
try:
from . import item_axis_policy
except ImportError: # Allows local smoke tests with top-level imports.
import item_axis_policy
def _context_text(item_text: str, item_axis_values: dict[str, Any] | None) -> str:
return " ".join(
str(part or "").lower()
for part in (
item_text,
*((item_axis_values or {}).values()),
)
)
return item_axis_policy.context_text(item_text, axis_values=item_axis_values)
def _mentions_ass(text: str) -> bool: