8 September 2026 · Syamjith NK
Searching GitHub for get_display arabic_reshaper.reshape language:python returns
3,168 files. On matplotlib 3.11 and on Pillow built with Raqm, that recipe
reverses your text. It would be easy to conclude there are three thousand broken projects out
there and start filing.
That conclusion is wrong, and the reason it is wrong is the only interesting thing here.
arabic_reshaper.reshape() converts Arabic to presentation forms.
get_display() puts the string into visual order. Together they do the work a text
engine would do, which is exactly right if the thing that draws your text does not do it for you,
and exactly wrong if it does.
| renderer | shapes and reorders? | the recipe is |
|---|---|---|
| matplotlib ≥ 3.11 | yes | a bug |
| matplotlib < 3.11 | no | required |
| Pillow built with Raqm | yes | a bug |
| Pillow without Raqm | no | required |
| ReportLab, fpdf | no | required |
print() to a terminal | terminal-dependent | not mine to judge |
So the search result is not a list of bugs. It is a list of places where somebody has to look at what happens next.
Ranked by stars and recency, then read rather than pattern-matched. Three were genuinely broken:
matplotlib>=3.10.5 with no upper bound, so a fresh install
resolves to 3.11 and every Arabic player name in its charts comes out backwards.Pillow unpinned.requirements.txt at all, so every chart label and
title it draws is reversed on a current install.Three were not:
print(). Terminals vary, and this is a
forty-line script.Two of the six matched the search and were fine. One matched, and the matching code does not execute. If I had filed on all six I would have been wrong half the time, and being wrong in public on someone else’s repository is expensive in a way that being quiet is not.
I put this into arabic-lint 0.2.0, and writing it taught me more than the search did. Every one of these came from testing against the six real files rather than snippets I made up:
from bidi.algorithm import get_display as _bidi_get_display. A checker that only knows
the canonical spelling passes the file in silence. This missed the first bot entirely.reshape() on one line and
get_display() on the next is the common shape. Looking only inside the
get_display() call missed the ComfyUI node.The tool now stays silent on all three of the projects that are fine, and flags all three that are not.
A grep gives you 3,168 results and no judgement. The judgement is the work, and most of it is deciding what not to report. A checker that flagged all 3,168 would be switched off within a day, and rightly.
The same is true of the search itself. Three thousand hits is not three thousand bugs; it is a population, and the interesting question is what fraction of it is actually broken. On a sample of six, it was half.