ci: helper: Use the ArgumentDefaultsHelpFormatter help formatter

This help formatter class reports the defaults we use for options
taking an argument.

Signed-off-by: Erik Skultety <eskultet@redhat.com>
Reviewed-by: Andrea Bolognani <abologna@redhat.com>
This commit is contained in:
Erik Skultety 2021-03-16 15:44:06 +01:00
parent c91fa27306
commit cbd7124f49

View File

@ -79,6 +79,7 @@ class Parser:
"build", "build",
help="run a build in a container", help="run a build in a container",
parents=[containerparser, mesonparser], parents=[containerparser, mesonparser],
formatter_class=argparse.ArgumentDefaultsHelpFormatter,
) )
buildparser.set_defaults(func=Application.action_build) buildparser.set_defaults(func=Application.action_build)
@ -87,6 +88,7 @@ class Parser:
"test", "test",
help="run a build in a container (including tests)", help="run a build in a container (including tests)",
parents=[containerparser, mesonparser], parents=[containerparser, mesonparser],
formatter_class=argparse.ArgumentDefaultsHelpFormatter,
) )
testparser.set_defaults(func=Application.action_test) testparser.set_defaults(func=Application.action_test)
@ -95,6 +97,7 @@ class Parser:
"shell", "shell",
help="start a shell in a container", help="start a shell in a container",
parents=[containerparser], parents=[containerparser],
formatter_class=argparse.ArgumentDefaultsHelpFormatter,
) )
shellparser.set_defaults(func=Application.action_shell) shellparser.set_defaults(func=Application.action_shell)
@ -102,6 +105,7 @@ class Parser:
listimagesparser = subparsers.add_parser( listimagesparser = subparsers.add_parser(
"list-images", "list-images",
help="list known container images", help="list known container images",
formatter_class=argparse.ArgumentDefaultsHelpFormatter,
) )
listimagesparser.set_defaults(func=Application.action_list_images) listimagesparser.set_defaults(func=Application.action_list_images)
@ -110,6 +114,7 @@ class Parser:
"refresh", "refresh",
help="refresh data generated with lcitool", help="refresh data generated with lcitool",
parents=[lcitoolparser], parents=[lcitoolparser],
formatter_class=argparse.ArgumentDefaultsHelpFormatter,
) )
refreshparser.set_defaults(func=Application.action_refresh) refreshparser.set_defaults(func=Application.action_refresh)