textual
textual copied to clipboard
default_cell_formatter() in DataTable formats float to 2-digit scale, which is often undesirable.
Code
https://github.com/Textualize/textual/blob/db3fda928ba3f4807f01ae24ecee260ce6206b1b/src/textual/widgets/_data_table.py#L197
This defaults all floats to be in 2-digit scale. I think it would be better to change this to simple float-to-str conversion, so that the user can decide the scale. If there is a specific reason to limit the float type scales, the scale should be left to maximum to the limits.