[issue41856] argparse: auto-generated synopsis omits REMAINDER argument

2020-09-24 Thread Reuben Thomas
Reuben Thomas added the comment: A workaround to help users for now is: >>> parser.add_argument('args', metavar='...', nargs=argparse.REMAINDER) as then at least the help entry corresponds to the synopsis: positional arguments: command ... And with a `help` string, this can be clarified

[issue41856] argparse: auto-generated synopsis omits REMAINDER argument

2020-09-24 Thread Reuben Thomas
New submission from Reuben Thomas : Consider the following example from the Python documentation: >>> parser = argparse.ArgumentParser(prog='PROG') >>> parser.add_argument('--foo') >>> parser.add_argument('command') >>> parser.add_argument('args', nargs=argparse.REMAINDER) Now show the help: