FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

Fix maxcolwidths width inflation with firstrow headers in grid formats by SergioChan · Pull Request #424 · astanin/python-tabulate · GitHub

Fix maxcolwidths width inflation with firstrow headers in grid formats - #424

Open
SergioChan wants to merge 1 commit into
astanin:masterfrom
SergioChan:fix-354-maxcolwidth-firstrow-header
Open

Fix maxcolwidths width inflation with firstrow headers in grid formats#424
SergioChan wants to merge 1 commit into
astanin:masterfrom
SergioChan:fix-354-maxcolwidth-firstrow-header

Conversation

Copy link
Copy Markdown

Summary

  • avoid inflating first-row header column widths beyond maxcolwidths for padded table formats (for example grid/fancy_grid)
  • keep existing behavior for non-padded formats (such as plain), where the extra inter-column spacing is still expected
  • add a regression test for issue maxcolwidths isn't properly respected: extra whitespace is added #354 using the maintainer-provided minimal repro (headers="firstrow", tablefmt="grid", maxcolwidths=3)

Testing

  • python -m pytest test/test_regression.py -k "maxcolwidths or firstrow_header"
  • python -m pytest test/test_output.py -k "maxcolwidth_single_value or maxcolwidth_pad_tailing_widths or maxcolwidth_honor_disable_parsenum"

Related

Fixes #354

This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

maxcolwidths isn't properly respected: extra whitespace is added

1 participant


Back | FazBrowse Home | New Git URL