Repository: pantsbuild/pants

Issue:
Deprecated option hints aren't tabbed in `help` goal(s)
**Describe the bug**
Deprecated option hints don't appear to be tabbed

When running `./pants help-advanced`
```
Global deprecated options
-------------------------
 
  --[no-]use-deprecated-python-macros
  PANTS_USE_DEPRECATED_PYTHON_MACROS
  use_deprecated_python_macros
      default: False
      current value: False
      If true, use Pants's deprecated macro system for `python_requirements`, `poetry_requirements`, and `pipenv_requirements` rather than target generation.
      
      The address for macros is different. Rather than `3rdparty/python#Django`, the address will look like `3rdparty/python:Django`. The macro (`python_requirements` et
      al) also was not a proper target, meaning that you could not give it a `name`. In contrast, if the target generator sets its `name`, e.g. to `reqs`, generated
      targets will have an address like `3rdparty/python:reqs#Django`.
      Deprecated, will be removed in version: 2.12.0.dev0.
      In Pants 2.12, the deprecated Python macros like `python_requirements` will be replaced with improved target generators, which are now enabled by default.

If you already migrated by setting `use_deprecated_python_macros = false`, simply delete the option.

Otherwise, when you are ready to upgrade, follow these steps:

  1. Run `./pants update-build-files --fix-python-macros`
  2. Check the logs for an ERROR log to see if you have to manually add `name=` anywhere.
  3. Remove `use_deprecated_python_macros = true` from `[GLOBAL]` in pants.toml.

(Why upgrade from the old macro mechanism to target generation? Among other benefits, it makes sure that the Pants daemon is properly invalidated when you change `requirements.txt` and `pyproject.toml`.)
```

**Pants version**
`main`

**OS**
Linux

**Additional info**
N/A



Discussion:

Resolving patch:
diff --git a/src/python/pants/help/help_formatter.py b/src/python/pants/help/help_formatter.py
--- a/src/python/pants/help/help_formatter.py
+++ b/src/python/pants/help/help_formatter.py
@@ -92,19 +92,33 @@ def format_value(ranked_val: RankedValue, prefix: str, left_padding: str) -> Lis
             val_lines = [self.maybe_cyan(f"{left_padding}{line}") for line in val_lines]
             return val_lines
 
+        def wrap(s: str) -> List[str]:
+            return hard_wrap(s, indent=len(indent), width=self._width)
+
         indent = "      "
+
         arg_lines = [f"  {self.maybe_magenta(args)}" for args in ohi.display_args]
         arg_lines.append(self.maybe_magenta(f"  {ohi.env_var}"))
         arg_lines.append(self.maybe_magenta(f"  {ohi.config_key}"))
+
         choices = "" if ohi.choices is None else f"one of: [{', '.join(ohi.choices)}]"
         choices_lines = [
             f"{indent}{'  ' if i != 0 else ''}{self.maybe_cyan(s)}"
             for i, s in enumerate(textwrap.wrap(f"{choices}", self._width))
         ]
+
+        deprecated_lines = []
+        if ohi.deprecated_message:
+            maybe_colorize = self.maybe_red if ohi.deprecation_active else self.maybe_yellow
+            deprecated_lines.extend(wrap(maybe_colorize(ohi.deprecated_message)))
+            if ohi.removal_hint:
+                deprecated_lines.extend(wrap(maybe_colorize(ohi.removal_hint)))
+
         default_lines = format_value(RankedValue(Rank.HARDCODED, ohi.default), "default: ", indent)
         if not ohi.value_history:
             # Should never happen, but this keeps mypy happy.
             raise ValueError("No value history - options not parsed.")
+
         final_val = ohi.value_history.final_value
         curr_value_lines = format_value(final_val, "current value: ", indent)
 
@@ -118,18 +132,14 @@ def format_value(ranked_val: RankedValue, prefix: str, left_padding: str) -> Lis
             for rv in interesting_ranked_values
             for line in format_value(rv, "overrode: ", f"{indent}    ")
         ]
-        description_lines = hard_wrap(ohi.help, indent=len(indent), width=self._width)
+        description_lines = wrap(ohi.help)
         lines = [
             *arg_lines,
             *choices_lines,
             *default_lines,
             *curr_value_lines,
             *value_derivation_lines,
+            *deprecated_lines,
             *description_lines,
         ]
-        if ohi.deprecated_message:
-            maybe_colorize = self.maybe_red if ohi.deprecation_active else self.maybe_yellow
-            lines.append(maybe_colorize(f"{indent}{ohi.deprecated_message}"))
-            if ohi.removal_hint:
-                lines.append(maybe_colorize(f"{indent}{ohi.removal_hint}"))
         return lines


Test patch: