Skip to content

Always list all positional arguments - #3860

Open
kdeldycke wants to merge 2 commits into
pallets:stablefrom
kdeldycke:list-all-positional-arguments
Open

Always list all positional arguments#3860
kdeldycke wants to merge 2 commits into
pallets:stablefrom
kdeldycke:list-all-positional-arguments

Conversation

@kdeldycke

@kdeldycke kdeldycke commented Sep 9, 2026

Copy link
Copy Markdown
Collaborator

This is inconsistent with the way options are displayed, as every options are displayed including those without help.

The reason to display all arguments in the Positional arguments section is to not introduce subtle confusion, as an argument without help would only be noticeable in the usage line.

Cloup already renders the section this way (see janluke/cloup#210) and is the source discussion with @janluke for that bug fix.

In this implementation, I refrained to always display the Positional arguments section. So I made the decision to not print the Positional arguments section in full if and only if at least one of its argument has an help. This decision is open to discussion.

This is a follow up on #3473

@kdeldycke kdeldycke added the help output Help text formatting, layout, and --help rendering label Sep 9, 2026
@kdeldycke kdeldycke added this to the 8.5.1 milestone Sep 9, 2026
@kdeldycke
kdeldycke force-pushed the list-all-positional-arguments branch from 67ed980 to 28c7ae0 Compare September 9, 2026 09:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

help output Help text formatting, layout, and --help rendering

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants