Skip to content

Commit

Permalink
Remind about advanced options last
Browse files Browse the repository at this point in the history
# Rust tests and lints will be skipped. Delete if not intended.
[ci skip-rust]

# Building wheels and fs_util will be skipped. Delete if not intended.
[ci skip-build-wheels]
  • Loading branch information
alexey-tereshenkov-oxb committed Feb 9, 2022
1 parent 2137edd commit fd83512
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/python/pants/help/help_formatter.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,17 +49,17 @@ def add_option(ohis, *, category=None):
lines.extend([*self.format_option(ohi), ""])

add_option(oshi.basic)
if self._show_advanced:
add_option(oshi.advanced, category="advanced")
if self._show_deprecated:
add_option(oshi.deprecated, category="deprecated")
if oshi.advanced and not self._show_advanced:
lines.append(
self.maybe_green(
f"There are advanced options which you can list by running "
f"`./pants help-advanced {oshi.scope}`"
)
)
if self._show_advanced:
add_option(oshi.advanced, category="advanced")
if self._show_deprecated:
add_option(oshi.deprecated, category="deprecated")
return [*lines, ""]

def format_option(self, ohi: OptionHelpInfo) -> List[str]:
Expand Down

0 comments on commit fd83512

Please sign in to comment.