[CLI] Fix datasets list table rendering#4157
Conversation
|
The docs for this PR live here. All of your documentation changes will be reflected on that endpoint. The docs are available until 30 days after the last update. |
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit a394de2. Configure here.
| out.table( | ||
| results, | ||
| headers=["id", "created_at", "description", "downloads", "gated", "likes", "private", "trending_score"], | ||
| ) |
There was a problem hiding this comment.
Hardcoded headers hide user-requested expand properties
Medium Severity
The datasets list command's hardcoded table headers cause two issues: --expand properties (like tags or siblings) are fetched but not displayed, and unrequested properties appear as empty columns, making output noisy. Previously, headers were auto-detected, showing all relevant data.
Reviewed by Cursor Bugbot for commit a394de2. Configure here.
There was a problem hiding this comment.
yes, not intended at all 🙈
Wauplin
left a comment
There was a problem hiding this comment.
Makes sense! Approving once the comment is addressed (juste remove the line?)
|
This PR has been shipped as part of the v1.13.0 release. |


This PR fixes the
hf datasets lstable rendering when dataset descriptions contain newlines.Root cause: the table formatter converted cell values to strings and then padded/truncated them without normalizing embedded newlines and indentation. Dataset descriptions often include Markdown with leading newlines, tabs, and spacing, so a single
DESCRIPTIONcell could spill onto multiple terminal lines and shift the remaining columns.The fix keeps the compact
hf datasets lscolumns, includingDESCRIPTION, and normalizes table cells to one line for human/agent table output before truncation. JSON output still returns the original values.Before:
After:
Note
Medium Risk
Touches shared CLI table formatting for both human and agent outputs, which could subtly change whitespace in existing command outputs and affect scripts that rely on exact formatting.
Overview
Fixes CLI table rendering when cell values contain newlines/tabs/extra indentation by normalizing all table cell values to a single line before truncation/printing (via new
_single_line()used across human and agent table formatters).Updates
hf datasets lsto pass an explicit, ordered header list so the table consistently shows the intended compact columns (includingdescription) instead of relying on auto-detected keys.Reviewed by Cursor Bugbot for commit a394de2. Configure here.