Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
-h, --help show this help message and exit
--foo FOO foo help - oh and by the way, null
--bar bar help (default: false)
title:
group description
--baz BAZ baz help (default: 42)
*/
print("TEST argparse.RawDescriptionHelpFormatter");
parser = new argparse.ArgumentParser({
debug: true,
prog: 'PROG',
formatterClass: argparse.RawDescriptionHelpFormatter,
description: 'Keep the formatting\n' +
' exactly as it is written\n' +
'\n' +
'here\n'
});
a = parser.addArgument(['--foo'], {
help: ' foo help should not\n' +
' retain this odd formatting'
});
parser.addArgument(['spam'], {
'help': 'spam help'
});
group = parser.addArgumentGroup({
-h, --help show this help message and exit
--foo FOO foo help - oh and by the way, null
--bar bar help (default: false)
title:
group description
--baz BAZ baz help (default: 42)
*/
print('TEST argparse.RawDescriptionHelpFormatter');
parser = new argparse.ArgumentParser({
debug: true,
prog: 'PROG',
formatterClass: argparse.RawDescriptionHelpFormatter,
description: 'Keep the formatting\n' +
' exactly as it is written\n' +
'\n' +
'here\n'
});
a = parser.addArgument([ '--foo' ], {
help: ' foo help should not\n' +
' retain this odd formatting'
});
parser.addArgument([ 'spam' ], {
help: 'spam help'
});
group = parser.addArgumentGroup({
function main() {
var optParser = new argparse.ArgumentParser({addHelp: false}),
parser = new argparse.ArgumentParser({
version: distMeta.version,
addHelp: true,
description: distMeta.description,
epilog: "Copyright (c) " + distMeta.year + " " + distMeta.author +
"\n\nLicensed under the " + distMeta.license +
" license, see the LICENSE file.",
formatterClass: argparse.RawDescriptionHelpFormatter
}),
subparsers = parser.addSubparsers({
title:"subcommands",
dest:"subcommand_name"
}),
readParser,
args;
optParser.addArgument(["inputFile"], {help: "Input file"});
optParser.addArgument(
["structureFile"], {help: "Structure definition file"});
optParser.addArgument(["typesFile"], {help: "Type definition file"});
optParser.addArgument(["outputFile"], {help: "Output file"});
optParser.addArgument(
["-d"], {
dest: "debug",