Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
var assert = require('assert');
var _ = require('underscore');
_.str = require('underscore.string');
var print = function () {
return console.log.apply(console, arguments);
};
// print = function () {};
var argparse = require('argparse');
print("TEST argparse.ArgumentDefaultsHelpFormatter");
parser = new argparse.ArgumentParser({
debug: true,
formatterClass: argparse.ArgumentDefaultsHelpFormatter,
description: 'description'
});
parser.addArgument(['--foo'], {
help: 'foo help - oh and by the way, %(defaultValue)s'
});
parser.addArgument(['--bar'], {
action: 'storeTrue',
help: 'bar help'
});
parser.addArgument(['spam'], {
help: 'spam help'
});
var assert = require('assert');
function print() {
return console.log.apply(console, arguments);
}
// print = function () {};
var argparse = require('argparse');
print('TEST argparse.ArgumentDefaultsHelpFormatter');
parser = new argparse.ArgumentParser({
debug: true,
formatterClass: argparse.ArgumentDefaultsHelpFormatter,
description: 'description'
});
parser.addArgument([ '--foo' ], {
help: 'foo help - oh and by the way, %(defaultValue)s'
});
parser.addArgument([ '--bar' ], {
action: 'storeTrue',
help: 'bar help'
});
parser.addArgument([ 'spam' ], {
help: 'spam help'
});