Skip to content

Add help parameter to arguments#3473

Open
yurishevtsov wants to merge 1 commit into
pallets:mainfrom
yurishevtsov:add-help-kwarg-to-arg-params
Open

Add help parameter to arguments#3473
yurishevtsov wants to merge 1 commit into
pallets:mainfrom
yurishevtsov:add-help-kwarg-to-arg-params

Conversation

@yurishevtsov
Copy link
Copy Markdown

@yurishevtsov yurishevtsov commented May 19, 2026

Adds a help parameter to click.argument() and an Arguments section on --help when argument help is set. Commands without argument help are unchanged.

Implementation follows options: Argument.get_help_record() returns the metavar and help text for the help formatter (the base Parameter class returns None, so arguments never appeared in help tables before).

Argument.to_info_dict() now includes help, matching Option, so parameter metadata stays consistent for doc tools; this is not required for CLI help output.

Deprecated arguments without explicit help show a deprecation-only row in Arguments, matching deprecated options.

fixes #2983

@yurishevtsov yurishevtsov force-pushed the add-help-kwarg-to-arg-params branch 4 times, most recently from 73e3c13 to b145f91 Compare May 19, 2026 18:55
@Rowlando13 Rowlando13 added the f:help feature: help text label May 19, 2026
@Rowlando13 Rowlando13 modified the milestones: 9.0.0, 8.5.0 May 19, 2026
Refactor: pull out args formatter into a dedicated method
@yurishevtsov yurishevtsov force-pushed the add-help-kwarg-to-arg-params branch from b145f91 to 71240f8 Compare May 19, 2026 20:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

f:help feature: help text

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add help kwarg to argument parameter

2 participants