Format the argparser output better, to deal with the longer argument names

This commit is contained in:
Miguel Jacq 2017-11-12 10:40:04 +11:00
parent 275f345604
commit 624028e49f
No known key found for this signature in database
GPG Key ID: EEA4341C6D97A0B6
2 changed files with 2 additions and 2 deletions

View File

@ -39,7 +39,7 @@ def main(cwd=None):
os.chdir(cwd)
# Parse arguments
parser = argparse.ArgumentParser()
parser = argparse.ArgumentParser(formatter_class=lambda prog: argparse.HelpFormatter(prog,max_help_position=28))
parser.add_argument('--local-only', action='store_true', dest='local_only', help=strings._("help_local_only"))
parser.add_argument('--stay-open', action='store_true', dest='stay_open', help=strings._("help_stay_open"))
parser.add_argument('--shutdown-timeout', metavar='<int>', dest='shutdown_timeout', default=0, help=strings._("help_shutdown_timeout"))

View File

@ -61,7 +61,7 @@ def main():
qtapp = Application()
# Parse arguments
parser = argparse.ArgumentParser()
parser = argparse.ArgumentParser(formatter_class=lambda prog: argparse.HelpFormatter(prog,max_help_position=48))
parser.add_argument('--local-only', action='store_true', dest='local_only', help=strings._("help_local_only"))
parser.add_argument('--stay-open', action='store_true', dest='stay_open', help=strings._("help_stay_open"))
parser.add_argument('--shutdown-timeout', metavar='<int>', dest='shutdown_timeout', default=0, help=strings._("help_shutdown_timeout"))