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

Clarify wording for --skip options (Cherry-pick of #16622) #16702

Merged
merged 1 commit into from
Aug 30, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 2 additions & 4 deletions src/python/pants/option/option_types.py
Original file line number Diff line number Diff line change
Expand Up @@ -787,10 +787,8 @@ def __new__(cls, goal: str, *other_goals: str):
return super().__new__(
cls, # type: ignore[arg-type]
default=False, # type: ignore[arg-type]
help=(
lambda subsystem_cls: (
f"Don't use {subsystem_cls.name} when running {invocation_str}."
)
help=lambda subsystem_cls: (
f"If true, don't use {subsystem_cls.name} when running {invocation_str}."
),
)

Expand Down
8 changes: 5 additions & 3 deletions src/python/pants/option/option_types_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -223,8 +223,10 @@ def expected_args_opt_info(help: str):
)

assert list(collect_options_info(MySubsystem)) == [
expected_skip_opt_info("Don't use Wrench when running `./pants fmt` and `./pants lint`."),
expected_skip_opt_info("Don't use Wrench when running `./pants fmt`."),
expected_skip_opt_info(
"If true, don't use Wrench when running `./pants fmt` and `./pants lint`."
),
expected_skip_opt_info("If true, don't use Wrench when running `./pants fmt`."),
expected_args_opt_info(
"Arguments to pass directly to Wrench, e.g. `--my-subsystem-args='--foo'`."
),
Expand All @@ -236,7 +238,7 @@ def expected_args_opt_info(help: str):
),
]
assert list(collect_options_info(SubsystemWithName)) == [
expected_skip_opt_info("Don't use Hammer when running `./pants fmt`."),
expected_skip_opt_info("If true, don't use Hammer when running `./pants fmt`."),
expected_args_opt_info(
"Arguments to pass directly to Hammer, e.g. `--other-subsystem-args='--nail'`."
),
Expand Down