Change to ArgumentDefaultsHelpFormatter.
Changed from this:
formatter_class=argparse.RawTextHelpFormatter
To this:
formatter_class=argparse.ArgumentDefaultsHelpFormatter
This greatly improves the formatting of the help text.
Change-Id: Ie3ad6afe0b3cda50e1b032c37a20ff22733de9bd
Signed-off-by: Michael Walsh <micwalsh@us.ibm.com>
diff --git a/bin/obmc_ser_num b/bin/obmc_ser_num
index 4f7958b..8cd05ad 100755
--- a/bin/obmc_ser_num
+++ b/bin/obmc_ser_num
@@ -26,7 +26,7 @@
description="%(prog)s will get the system serial number from an OBMC" +
" machine and print it to stdout as follows:\n\n" +
"mch_ser_num:<ser num>",
- formatter_class=argparse.RawTextHelpFormatter,
+ formatter_class=argparse.ArgumentDefaultsHelpFormatter,
prefix_chars='-+')
parser.add_argument(
diff --git a/bin/process_plug_in_packages.py b/bin/process_plug_in_packages.py
index c45f559..dc84105 100755
--- a/bin/process_plug_in_packages.py
+++ b/bin/process_plug_in_packages.py
@@ -54,7 +54,7 @@
" 0x00000200). That is because the rightmost byte is" +
" reserverd for errors in calling the call point program" +
" rather than errors generated by the call point program.>",
- formatter_class=argparse.RawTextHelpFormatter,
+ formatter_class=argparse.ArgumentDefaultsHelpFormatter,
prefix_chars='-+')
# Create arguments.
diff --git a/bin/validate_plug_ins.py b/bin/validate_plug_ins.py
index 15d02a1..33ace31 100755
--- a/bin/validate_plug_ins.py
+++ b/bin/validate_plug_ins.py
@@ -30,7 +30,7 @@
description="%(prog)s will validate the plug-in packages passed to it." +
" It will also print a list of the absolute plug-in" +
" directory paths for use by the calling program.",
- formatter_class=argparse.RawTextHelpFormatter,
+ formatter_class=argparse.ArgumentDefaultsHelpFormatter,
prefix_chars='-+')
# Create arguments.
diff --git a/templates/python_pgm_template b/templates/python_pgm_template
index 9e70cbd..fa3b0c2 100644
--- a/templates/python_pgm_template
+++ b/templates/python_pgm_template
@@ -20,7 +20,7 @@
parser = argparse.ArgumentParser(
usage='%(prog)s [OPTIONS]',
description="%(prog)s will...",
- formatter_class=argparse.RawTextHelpFormatter,
+ formatter_class=argparse.ArgumentDefaultsHelpFormatter,
prefix_chars='-+')
parser.add_argument(