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 colours to argparse interpolated values in --help #141939

Copy link
Copy link
@alexprengere

Description

@alexprengere
Issue body actions

Feature or enhancement

Proposal:

#141680 was merged, but only applies when argparse.ArgumentDefaultsHelpFormatter is used.
I suggest to apply a similar change for all interpolated values, like when the help text leverages %(default)s to show default value(s):

Image

Excluding tests, the change is fairly simple, it is a 4 line change in argparse _expand_help method.

I am not sure if this should apply to just default or other interpolated values like choices.

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
    Doc issues
    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.