Skip to content

Keep usage option tokens intact when wrapping help text - #3771

Closed
Hashim1999164 wants to merge 1 commit into
pallets:mainfrom
Hashim1999164:fix_usage_option_wrap
Closed

Keep usage option tokens intact when wrapping help text#3771
Hashim1999164 wants to merge 1 commit into
pallets:mainfrom
Hashim1999164:fix_usage_option_wrap

Conversation

@Hashim1999164

@Hashim1999164 Hashim1999164 commented Aug 16, 2026

Copy link
Copy Markdown

write_usage wraps args with wrap_text. The wrapper inherited textwrap hyphen breaks, so tokens such as option names were split across lines.

Disable hyphen breaks for usage args so each whitespace separated token stays together.

Fixes #3362

@davidism

Copy link
Copy Markdown
Member

@davidism davidism closed this Aug 16, 2026
@davidism davidism added the rejected AI Contribution rejected because of its untrustworthy AI origin label Aug 16, 2026
@Hashim1999164
Hashim1999164 deleted the fix_usage_option_wrap branch August 16, 2026 13:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

rejected AI Contribution rejected because of its untrustworthy AI origin

Projects

None yet

Development

Successfully merging this pull request may close these issues.

HelpFormatter.write_usage breaks options at a hyphen

2 participants