Skip to content

table: also reject a NaN or infinite width or gutter - #2111

Merged
andersonhc merged 3 commits into
py-pdf:masterfrom
RavSinghChandan:table-finite
Nov 7, 2026
Merged

andersonhc merged 3 commits into
py-pdf:masterfrom
RavSinghChandan:table-finite

Conversation

@RavSinghChandan

Copy link
Copy Markdown

table(width=float("nan")) passed the width <= 0 check from #2096 and wrote nan coordinates for the cells (nan 789.54 nan 24.00 re S); a NaN or infinite col_widths, gutter_height or gutter_width got through the same way. They now raise the existing ValueError naming the parameter.

  • A unit test is covering the code added / modified by this PR
  • A mention of the change is present in CHANGELOG.md
  • This PR is ready to be merged

@andersonhc
andersonhc merged commit d396cf0 into py-pdf:master Nov 7, 2026
23 checks passed
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.

2 participants