Override to ensure the formatter is aware of the target file.
(self, file: IO[str] | None = None)
| 650 | super().print_usage(file) |
| 651 | |
| 652 | def print_help(self, file: IO[str] | None = None) -> None: # type:ignore[override] |
| 653 | """Override to ensure the formatter is aware of the target file.""" |
| 654 | if file is None: |
| 655 | file = self._thread_locals.current_output_file |
| 656 | |
| 657 | with self.output_to(file): |
| 658 | super().print_help(file) |
| 659 | |
| 660 | def get_subparsers_action(self) -> "argparse._SubParsersAction[Cmd2ArgumentParser]": |
| 661 | """Get the _SubParsersAction for this parser if it exists. |