diff --git a/colcon_core/command.py b/colcon_core/command.py index e21fc62f..a5dc0aec 100644 --- a/colcon_core/command.py +++ b/colcon_core/command.py @@ -19,8 +19,8 @@ """Environment variable to set the warnings filter for colcon modules""" WARNINGS_ENVIRONMENT_VARIABLE = EnvironmentVariable( 'COLCON_WARNINGS', - 'Set the warnings filter similar to PYTHONWARNINGS except that the module ' - "entry is implicitly set to 'colcon.*'") + 'Set the warnings filter similar to `PYTHONWARNINGS` except that the ' + 'module entry is implicitly set to `colcon.*`') warnings_filters = os.environ.get(WARNINGS_ENVIRONMENT_VARIABLE.name) if warnings_filters: @@ -75,7 +75,7 @@ """Environment variable to set the configuration directory""" HOME_ENVIRONMENT_VARIABLE = EnvironmentVariable( 'COLCON_HOME', - 'Set the configuration directory (default: ~/.colcon)') + 'Set the configuration directory (default: `~/.colcon`)') _command_exit_handlers = [] @@ -379,12 +379,12 @@ def add_log_level_argument(parser): """ parser.add_argument( '--log-base', - help='The base path for all log directories (default: ./log, to ' - f'disable: {os.devnull})') + help='The base path for all log directories (default: `./log`, to ' + f'disable: `{os.devnull}`)') parser.add_argument( '--log-level', action=LogLevelAction, help='Set log level for the console output, either by numeric or ' - 'string value (default: warning)') + 'string value (default: `warning`)') class LogLevelAction(argparse.Action): diff --git a/colcon_core/executor/__init__.py b/colcon_core/executor/__init__.py index 20a8f127..e18035fa 100644 --- a/colcon_core/executor/__init__.py +++ b/colcon_core/executor/__init__.py @@ -254,7 +254,7 @@ def add_executor_arguments(parser): group.add_argument( '--executor', type=str, choices=keys, default=default, - help=f'The executor to process all packages (default: {default})' + help=f'The executor to process all packages (default: %(default)s)' f'{descriptions}') # noqa: E131 for priority in extensions.keys(): diff --git a/colcon_core/package_discovery/path.py b/colcon_core/package_discovery/path.py index f17bccf5..938ecfa1 100644 --- a/colcon_core/package_discovery/path.py +++ b/colcon_core/package_discovery/path.py @@ -36,7 +36,7 @@ def add_arguments( # noqa: D102 type=get_cwd_path_resolver(), help='The paths to check for a package. Use shell wildcards ' '(e.g. `src/*`) to select all direct subdirectories' + - (' (default: .)' if with_default else '')) + (' (default: `.`)' if with_default else '')) def has_parameters(self, *, args): # noqa: D102 return not is_default_value(args.paths) and \ diff --git a/colcon_core/task/python/test/pytest.py b/colcon_core/task/python/test/pytest.py index 335e2140..f5a81241 100644 --- a/colcon_core/task/python/test/pytest.py +++ b/colcon_core/task/python/test/pytest.py @@ -39,7 +39,7 @@ def add_arguments(self, *, parser): # noqa: D102 nargs='*', metavar='*', type=str.lstrip, help='Pass arguments to pytests. ' 'Arguments matching other options must be prefixed by a space,\n' - 'e.g. --pytest-args " --help" (stdout might not be shown by ' + 'e.g. `--pytest-args " --help"` (stdout might not be shown by ' 'default, e.g. add `--event-handlers console_cohesion+`)') parser.add_argument( '--pytest-with-coverage', diff --git a/colcon_core/task/python/test/setuppy_test.py b/colcon_core/task/python/test/setuppy_test.py index 50090447..647b669b 100644 --- a/colcon_core/task/python/test/setuppy_test.py +++ b/colcon_core/task/python/test/setuppy_test.py @@ -23,7 +23,7 @@ def add_arguments(self, *, parser): # noqa: D102 nargs='*', metavar='*', type=str.lstrip, help='Pass arguments to Python unittests. ' 'Arguments matching other options must be prefixed by a space,\n' - 'e.g. --unittest-args " --help" (stdout might not be shown by ' + 'e.g. `--unittest-args " --help"` (stdout might not be shown by ' 'default, e.g. add `--event-handlers console_cohesion+`)') def match(self, context, env, setup_py_data): # noqa: D102 diff --git a/colcon_core/verb/build.py b/colcon_core/verb/build.py index 53e1f269..a00694e9 100644 --- a/colcon_core/verb/build.py +++ b/colcon_core/verb/build.py @@ -86,12 +86,14 @@ def add_arguments(self, *, parser): # noqa: D102 '--build-base', default=wrap_default_value('build'), type=get_cwd_path_resolver(), - help='The base path for all build directories (default: build)') + help='The base path for all build directories ' + '(default: %(default)s)') parser.add_argument( '--install-base', default=wrap_default_value('install'), type=get_cwd_path_resolver(), - help='The base path for all install prefixes (default: install)') + help='The base path for all install prefixes ' + '(default: %(default)s)') parser.add_argument( '--merge-install', action='store_true', @@ -103,7 +105,8 @@ def add_arguments(self, *, parser): # noqa: D102 parser.add_argument( '--test-result-base', type=get_cwd_path_resolver(), - help='The base path for all test results (default: --build-base)') + help='The base path for all test results ' + '(default: same as `--build-base`)') parser.add_argument( '--continue-on-error', action='store_true', diff --git a/colcon_core/verb/test.py b/colcon_core/verb/test.py index d33eaeed..951e7921 100644 --- a/colcon_core/verb/test.py +++ b/colcon_core/verb/test.py @@ -103,7 +103,8 @@ def add_arguments(self, *, parser): # noqa: D102 parser.add_argument( '--test-result-base', type=get_cwd_path_resolver(), - help='The base path for all test results (default: --build-base)') + help='The base path for all test results ' + '(default: same as `--build-base`)') group = parser.add_mutually_exclusive_group() group.add_argument( '--retest-until-fail',