Format rocporfv3 help (#1199)

* Format rocporfv3 help

* python formatter fix

[ROCm/rocprofiler-sdk commit: a976ed0783]
Este commit está contenido en:
Gopesh Bhardwaj
2024-11-19 08:21:02 +05:30
cometido por GitHub
padre 1ea688c447
commit a71d6dc340
+11 -1
Ver fichero
@@ -31,6 +31,16 @@ def fatal_error(msg, exit_code=1):
sys.exit(exit_code)
def format_help(formatter, w=120, h=40):
"""Return a wider HelpFormatter, if possible."""
try:
kwargs = {"width": w, "max_help_position": h}
formatter(None, **kwargs)
return lambda prog: formatter(prog, **kwargs)
except TypeError:
return formatter
def strtobool(val):
"""Convert a string representation of truth to true or false.
True values are 'y', 'yes', 't', 'true', 'on', and '1'; false values
@@ -80,7 +90,7 @@ For MPI applications (or other job launchers such as SLURM), place rocprofv3 ins
description="ROCProfilerV3 Run Script",
usage="%(prog)s [options] -- <application> [application options]",
epilog=usage_examples,
formatter_class=argparse.RawTextHelpFormatter,
formatter_class=format_help(argparse.RawTextHelpFormatter),
)
def add_parser_bool_argument(gparser, *args, **kwargs):