Skip to content

Improve argument coloring where available - #743

Open
cottsay wants to merge 1 commit into
masterfrom
cottsay/help-colors
Open

Improve argument coloring where available#743
cottsay wants to merge 1 commit into
masterfrom
cottsay/help-colors

Conversation

@cottsay

@cottsay cottsay commented Aug 17, 2026

Copy link
Copy Markdown
Member
  • Use %(default)s where appropriate
  • Otherwise, use backticks around default values
  • Use backticks when referring to console commands, such as references to other command line options or example command invocations

Example with Python 3.15:
out

Note that we're not actually choosing the palette here, we're just giving argparse the information it needs to align with other console output.

@cottsay cottsay self-assigned this Aug 17, 2026
@cottsay cottsay added the enhancement New feature or request label Aug 17, 2026
* Use %(default)s where appropriate
* Otherwise, use backticks around default values
* Use backticks when referring to console commands, such as references
  to other command line options or example command invocations
@cottsay
cottsay force-pushed the cottsay/help-colors branch from d6b7d9b to 48ed3a0 Compare August 18, 2026 02:44
@codecov

codecov Bot commented Aug 18, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 87.66%. Comparing base (6428dca) to head (48ed3a0).

Additional details and impacted files
@@           Coverage Diff           @@
##           master     #743   +/-   ##
=======================================
  Coverage   87.66%   87.66%           
=======================================
  Files          74       74           
  Lines        4442     4442           
  Branches      771      771           
=======================================
  Hits         3894     3894           
  Misses        433      433           
  Partials      115      115           

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@cottsay
cottsay requested a review from PiousCrossten August 31, 2026 16:25

@PiousCrossten PiousCrossten left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Works fine, nothing breaks. Ran the tests locally, flake8 and spell check pass, coverage unchanged.

One thing that looks like it slipped through:
verb/test.py:93 and :98 - the --build-base / --install-base args there are identical to the ones in verb/build.py (same wrap_default_value() defaults), but they still say (default: build) / (default: install). So colcon build --help gets the coloring and colcon test --help doesn't.

Rest LGTM 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants