Merge pull request #504 from gcarq/improve_argparse

Use substitution in argparse help texts
This commit is contained in:
Gérald LONLAS 2018-02-04 13:36:01 -08:00 committed by GitHub
commit 2765ee5a85
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -145,15 +145,15 @@ def common_args_parser(description: str):
) )
parser.add_argument( parser.add_argument(
'-c', '--config', '-c', '--config',
help='specify configuration file (default: config.json)', help='specify configuration file (default: %(default)s)',
dest='config', dest='config',
default='config.json', default='config.json',
type=str, type=str,
metavar='PATH', metavar='PATH',
) )
parser.add_argument( parser.add_argument(
'--datadir', '-d', '--datadir',
help='path to backtest data (default freqdata/tests/testdata)', help='path to backtest data (default: %(default)s',
dest='datadir', dest='datadir',
default=os.path.join('freqtrade', 'tests', 'testdata'), default=os.path.join('freqtrade', 'tests', 'testdata'),
type=str, type=str,
@ -161,7 +161,7 @@ def common_args_parser(description: str):
) )
parser.add_argument( parser.add_argument(
'-s', '--strategy', '-s', '--strategy',
help='specify strategy file (default: freqtrade/strategy/default_strategy.py)', help='specify strategy file (default: %(default)s)',
dest='strategy', dest='strategy',
default='default_strategy', default='default_strategy',
type=str, type=str,
@ -254,7 +254,7 @@ def backtesting_options(parser: argparse.ArgumentParser) -> None:
def hyperopt_options(parser: argparse.ArgumentParser) -> None: def hyperopt_options(parser: argparse.ArgumentParser) -> None:
parser.add_argument( parser.add_argument(
'-e', '--epochs', '-e', '--epochs',
help='specify number of epochs (default: 100)', help='specify number of epochs (default: %(default)d)',
dest='epochs', dest='epochs',
default=100, default=100,
type=int, type=int,