Skip to content

fix: reflow multi-line command description prose in help output#50

Merged
Andarius merged 3 commits into
masterfrom
fix/description-reflow
Jun 10, 2026
Merged

fix: reflow multi-line command description prose in help output#50
Andarius merged 3 commits into
masterfrom
fix/description-reflow

Conversation

@Andarius

Copy link
Copy Markdown
Owner

What

RichFormatter._print_description() joined every description line with a Markdown hard break (" \n"), so a wrapped docstring reproduced its source line breaks verbatim in -h output — leaving orphan fragments like and TLS cert and multi-project on their own lines.

This passes the description verbatim to Markdown instead.

Effect

Prose within a paragraph now reflows to terminal width; blank lines remain paragraph breaks.

Before

DESCRIPTION
 Credentials are read from the SCW profile. The PG backend connection string
 and TLS cert
 are fetched from Scaleway Secret Manager — pass --secret-id explicitly for
 multi-project
 setups, or let it fall back to parsing provisioning/scripts/setup-backend.sh.

After

DESCRIPTION
 Credentials are read from the SCW profile. The PG backend connection string
 and TLS cert are fetched from Scaleway Secret Manager — pass --secret-id
 explicitly for multi-project setups, or let it fall back to parsing
 provisioning/scripts/setup-backend.sh.

Trade-off

A single \n in a description no longer forces a line break — use a blank line, two trailing spaces, or a Markdown list/code block for intentional breaks (standard Markdown semantics).

All 66 formatter tests pass.

Pass the description verbatim to `Markdown` in `RichFormatter._print_description()`
instead of joining lines with a hard break (`"  \n"`). Wrapped docstring lines now
reflow to terminal width, while blank lines are preserved as paragraph breaks.

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Import Performance

Details
Benchmark suite Current: 93478f5 Previous: b17dcd9 Ratio
piou (core) 84.25 ms (0.52) 92.72 ms (1.76) 0.91
piou (rich) 139.44 ms (4.83) 148.08 ms (3.65) 0.94
piou.tui 274.16 ms (3.89) 298.9 ms (12.13) 0.92

This comment was automatically generated by workflow using github-action-benchmark.

@Andarius Andarius merged commit 3041926 into master Jun 10, 2026
6 checks passed
@Andarius Andarius self-assigned this Jun 10, 2026
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.

1 participant