mirror of https://github.com/Textualize/rich.git
7a53a9f683
Ideally we'd use the parameter `key` of `bisect_right` with `itemgetter(0)` but that's +3.10 only. So, instead we build the tuple `(cp,)`. This means that the tuple `(2,)` will be placed to the right of the range `(1, 31, -1)`, and we can do the calculations as before. However, this will codepoints at the start of their ranges on the wrong side of the range. E.g., `(1,)` would be placed to the left of `(1, 31, -1)` instead of to the right. To fix this, we add a second element to the tuple that is larger than any second element in the ranges, which ensures that whenever the first element of the tuples (the codepoint and the range start) match, the tuple with the codepoint is always placed on the right. Relevant review comment: https://github.com/Textualize/rich/pull/3300#issuecomment-1987269715 |
||
---|---|---|
.. | ||
README.md | ||
cats.json | ||
make_emoji.py | ||
make_terminal_widths.py | ||
movies.md | ||
profile_divide.py | ||
profile_pretty.py | ||
stress_test_pretty.py |
README.md
Tools
These are scripts used in the development of Rich, and aren't for general use. But feel free to look around.
Some strikethrough text.