Whole file
pri22296/beautifultable
The author described this change as “fix #28: correct widths for wide columns”. It counts as a record because the check below fails on the code as it stood at d3e55f597 and passes on 7794a61df, with nothing else changed between the two runs.
Projectpri22296/beautifultable
Fix saved2018-10-07
Sharing licenceMIT · LICENSE.txt
Change size+2 −1
What the code was meant to do, written into the code itself as a save note
fix #28: correct widths for wide columns
The change
| 622 | 622 | actual_space = sum_ - temp_sum | |
| 623 | 623 | for i, _ in enumerate(widths): | |
| 624 | 624 | if not flag[i]: | |
| 625 | - | widths[i] = int(round(widths[i] * avail_space / actual_space)) | |
| 625 | + | new_width = int(round(widths[i] * avail_space / actual_space)) | |
| 626 | + | widths[i] = min(widths[i], new_width) | |
| 626 | 627 | self.column_widths = widths | |
| 627 | 628 | ||
| 628 | 629 | def set_padding_widths(self, pad_width): |
The check that tells the two apart
fail→pass·test.py::TableOperationsTestCase::test_table_auto_width
Check file test.py, taken without changes from the fix and copied onto the older code, so the exact same check runs against both versions.
Origin and history
The code before itd3e55f597be47dbfb245768d23a0176c1b059f1e
Broken version dated2018-09-05
Modulebeautifultable.beautifultable
Units changedBeautifulTable
Fingerprint59246c6cf753ed71
Checked2026-08-18 by goldset/0.1
Every field above is generated by our program. None of it is written by hand.