tessl install tessl/pypi-python-bidi@0.6.0Python Bidi layout wrapping the Rust crate unicode-bidi
Agent Success
Agent success rate when using this tile
93%
Improvement
Agent success rate improvement when using this tile compared to baseline
1.09x
Baseline
Agent success rate without this tile
85%
Build a function that processes bidirectional text with explicit control over the paragraph's base direction, allowing you to force left-to-right or right-to-left layout regardless of automatic text analysis.
@generates
def display_with_direction(text: str, direction: str) -> str:
"""
Process bidirectional text with an explicit base direction.
Args:
text: The input text containing bidirectional content
direction: Either 'LTR' for left-to-right or 'RTL' for right-to-left
Returns:
The text reordered for display with the specified base direction
Raises:
ValueError: If direction is not 'LTR' or 'RTL'
"""
passProvides bidirectional text layout algorithm implementation with support for explicit direction control.
@satisfied-by