argparse: ArgumentOptions.metavar can be an array (#41283)

This is essential for useful docs for nargs >= 2.

https://docs.python.org/dev/library/argparse.html#metavar says this
about metavar and nargs:

Different values of nargs may cause the metavar to be used multiple
times. Providing a tuple to metavar specifies a different display for
each of the arguments.
This commit is contained in:
Thomas Sondergaard
2019-12-31 15:33:55 -08:00
committed by Ryan Cavanaugh
parent 8394dae20e
commit a125cc10fc
+1 -1
View File
@@ -109,7 +109,7 @@ export interface ArgumentOptions {
choices?: string | string[];
required?: boolean;
help?: string;
metavar?: string;
metavar?: string | string[];
}
export namespace Const {