Use shared item axis context in role routes
This commit is contained in:
@@ -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:
|
||||
|
||||
Reference in New Issue
Block a user