Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Add colour to defaults in argparse help #141679

Copy link
Copy link
@hugovk

Description

@hugovk
Issue body actions

Feature or enhancement

Proposal:

argparse help is in colour in Python 3.14:

Image

The defaults are also in the same plaintext as the main help, but some other CLIs use another colour.

Typer defaults are light grey:

Image

Composer defaults are yellow:

Image

For argparse, I suggest having "(default: " and ")" in grey, as they're not so important (and always the same). And the default value itself in (non-bold) yellow, to mirror the (bold) yellow of the label, where the default is sort of slotting into. For example, "pretty" is the default format, and the other choices are also in yellow:

Image

Has this already been discussed elsewhere?

This is a minor feature, which does not need previous discussion elsewhere

Links to previous discussion of this feature:

No response

Linked PRs

Reactions are currently unavailable

Metadata

Metadata

Assignees

No one assigned

    Labels

    stdlibStandard Library Python modules in the Lib/ directoryStandard Library Python modules in the Lib/ directorytype-featureA feature request or enhancementA feature request or enhancement
    No fields configured for issues without a type.

    Projects

    Status
    Done
    Show more project fields

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      Morty Proxy This is a proxified and sanitized view of the page, visit original site.