Skip to content

Preserve grid data rows across separating lines - #509

Open
OnlineBunker wants to merge 2 commits into
astanin:masterfrom
OnlineBunker:fix/grid-separating-line-rows
Open

OnlineBunker wants to merge 2 commits into
astanin:masterfrom
OnlineBunker:fix/grid-separating-line-rows

Conversation

@OnlineBunker

Copy link
Copy Markdown

Fixes #508.

Grid formatting zipped a row list containing reinserted separators with a shorter data-row alignment list. Multiple separators could silently omit data rows and shift vertical alignments. Iterate every row and consume an alignment only for data rows, preserving the existing separator rules.

Added 34 regression/control cases across grid, fancy_grid and rounded_grid: leading/trailing/consecutive separators, exact output and multiline row alignment. Twenty-eight fail on unchanged master; six are controls.

Validation on Linux Python 3.10, 3.11, 3.12, 3.13 and 3.14: 416 passed, 1 skipped on each, including library/README doctests and NumPy/pandas/wcwidth tests. Full Ruff checks and changed-file formatting checks pass. Both submitted files were read back from the branch, matched to the tested content, and retested in a separate directory (416 passed, 1 skipped). Inspected rendered before/after tables and multiline alignment. Other operating systems not tested.

This changes only the grid iteration branch, not #452's separate nongrid alignment work or #465/#470's index validation.

AI-assisted implementation and tests.

Keep data rows and vertical alignments when separators are reinserted. AI-assisted implementation and tests.
Add 34 regression/control cases across grid formats. AI-assisted tests.
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.

Grid formats silently drop data rows after multiple separating lines

1 participant