Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Hide verb block from help if there are no verbs #654

Merged
merged 1 commit into from
Jul 25, 2024

Conversation

cottsay
Copy link
Member

@cottsay cottsay commented Jul 24, 2024

Rather than show an empty verb block when there are no verbs, just hide the block from the help text entirely.

Before:

$ COLCON_EXTENSION_BLOCKLIST=colcon_core.verb colcon --help
usage: colcon [-h] [--log-base LOG_BASE] [--log-level LOG_LEVEL] {} ...

options:
  -h, --help            show this help message and exit
  --log-base LOG_BASE   The base path for all log directories (default: ./log, to disable: /dev/null)
  --log-level LOG_LEVEL
                        Set log level for the console output, either by numeric or string value (default: warning)

colcon verbs:
  {}

Environment variables:
  ...

After:

$ COLCON_EXTENSION_BLOCKLIST=colcon_core.verb colcon --help
usage: colcon [-h] [--log-base LOG_BASE] [--log-level LOG_LEVEL]

options:
  -h, --help            show this help message and exit
  --log-base LOG_BASE   The base path for all log directories (default: ./log, to disable: /dev/null)
  --log-level LOG_LEVEL
                        Set log level for the console output, either by numeric or string value (default: warning)

Environment variables:
  ...

Follow-up to #620

Rather than show an empty verb block when there are no verbs, just hide
the block from the help text entirely.

Follow-up to 6cf24ea
@cottsay cottsay added the enhancement New feature or request label Jul 24, 2024
@cottsay cottsay self-assigned this Jul 24, 2024
Copy link

codecov bot commented Jul 24, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 87.26%. Comparing base (aa80ae5) to head (9da103d).

Additional details and impacted files
@@           Coverage Diff           @@
##           master     #654   +/-   ##
=======================================
  Coverage   87.26%   87.26%           
=======================================
  Files          67       67           
  Lines        3904     3904           
  Branches      773      773           
=======================================
  Hits         3407     3407           
  Misses        391      391           
  Partials      106      106           

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

@cottsay cottsay added this to the 0.17.1 milestone Jul 25, 2024
@cottsay cottsay merged commit 2b2468b into master Jul 25, 2024
36 checks passed
@cottsay cottsay deleted the cottsay/no-empty-verbs branch July 25, 2024 20:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Development

Successfully merging this pull request may close these issues.

2 participants