Skip to content

fix: render empty CSV and TSV files without crashing - #143

Open
xiehuanyi wants to merge 1 commit into
Textualize:mainfrom
xiehuanyi:fix/empty-csv-input-20261008
Open

xiehuanyi wants to merge 1 commit into
Textualize:mainfrom
xiehuanyi:fix/empty-csv-input-20261008

Conversation

@xiehuanyi

Copy link
Copy Markdown

Empty .csv and .tsv files currently raise an uncaught StopIteration when header detection falls back to the filename's dialect. Reading an optional header now uses an empty header when there is no first row, so empty delimited files render successfully instead of crashing.

Before the fix, two CLI regressions fail with StopIteration. Afterward, the full test suite passes: 3 tests. Black checks for both changed files and git diff --check pass. Tests ran on Python 3.14 with Click 8.1.8, which is within the declared dependency range and retains the FC import used by the existing test. No dependency or lockfile changes are included.

AI assistance: OpenAI Codex helped implement and verify this change. This addresses empty filename-based CSV/TSV input; delimiter detection for unnamed stdin is unchanged.

Copilot AI balanced review requested due to automatic review settings October 8, 2026 11:23

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

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