rich/tools
Rodrigo Girão Serrão 7a53a9f683
Revert back to old CELL_WIDTHS format.
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
2024-03-11 11:56:32 +00:00
..
README.md Add support for strikethrough text 2023-01-18 10:45:03 +00:00
cats.json Fix typos 2022-09-04 10:58:02 +01:00
make_emoji.py Run the latest black. 2022-03-11 19:12:46 +03:00
make_terminal_widths.py Revert back to old CELL_WIDTHS format. 2024-03-11 11:56:32 +00:00
movies.md Update styling to be minimal in markdown tables, add inline style support 2023-05-31 15:03:21 +01:00
profile_divide.py Rename 2022-04-24 09:08:53 +01:00
profile_pretty.py version bump 2020-10-20 15:03:28 +01:00
stress_test_pretty.py optimizations 2021-11-25 20:47:09 +00:00

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.