Improve argument coloring where available - #743
Open
cottsay wants to merge 1 commit into
Open
Conversation
* 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
force-pushed
the
cottsay/help-colors
branch
from
August 18, 2026 02:44
d6b7d9b to
48ed3a0
Compare
Codecov Report✅ All modified and coverable lines are covered by tests. 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. 🚀 New features to boost your workflow:
|
PiousCrossten
approved these changes
Sep 6, 2026
There was a problem hiding this comment.
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 👍
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Example with Python 3.15:

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