minor cosmetics in arguments.py

This commit is contained in:
hroff-1902 2019-07-07 01:20:26 +03:00
parent a65b5f8e02
commit 082065cd50

View File

@ -1,7 +1,6 @@
""" """
This module contains the argument manager class This module contains the argument manager class
""" """
import argparse import argparse
import os import os
import re import re
@ -29,9 +28,9 @@ class Arg:
self.kwargs = kwargs self.kwargs = kwargs
# List of available command line arguments # List of available command line options
AVAILABLE_CLI_OPTIONS = { AVAILABLE_CLI_OPTIONS = {
# Common arguments # Common options
"loglevel": Arg( "loglevel": Arg(
'-v', '--verbose', '-v', '--verbose',
help='Verbose mode (-vv for more, -vvv to get all messages).', help='Verbose mode (-vv for more, -vvv to get all messages).',
@ -122,7 +121,7 @@ AVAILABLE_CLI_OPTIONS = {
'up-to-date data.', 'up-to-date data.',
action='store_true', action='store_true',
), ),
# backtesting # Backtesting
"position_stacking": Arg( "position_stacking": Arg(
'--eps', '--enable-position-stacking', '--eps', '--enable-position-stacking',
help='Allow buying the same pair multiple times (position stacking).', help='Allow buying the same pair multiple times (position stacking).',
@ -223,13 +222,13 @@ AVAILABLE_CLI_OPTIONS = {
metavar='INT', metavar='INT',
default=1, default=1,
), ),
# List_exchange # List exchanges
"print_one_column": Arg( "print_one_column": Arg(
'-1', '--one-column', '-1', '--one-column',
help='Print exchanges in one column.', help='Print exchanges in one column.',
action='store_true', action='store_true',
), ),
# script_options # Script options
"pairs": Arg( "pairs": Arg(
'-p', '--pairs', '-p', '--pairs',
help='Show profits for only these pairs. Pairs are comma-separated.', help='Show profits for only these pairs. Pairs are comma-separated.',
@ -264,7 +263,7 @@ AVAILABLE_CLI_OPTIONS = {
help='Clean all existing data for the selected exchange/pairs/timeframes.', help='Clean all existing data for the selected exchange/pairs/timeframes.',
action='store_true', action='store_true',
), ),
# Plot dataframe options # Plot dataframe
"indicators1": Arg( "indicators1": Arg(
'--indicators1', '--indicators1',
help='Set indicators from your strategy you want in the first row of the graph. ' help='Set indicators from your strategy you want in the first row of the graph. '
@ -294,7 +293,9 @@ AVAILABLE_CLI_OPTIONS = {
), ),
} }
ARGS_COMMON = ["loglevel", "logfile", "version", "config", "datadir"] ARGS_COMMON = ["loglevel", "logfile", "version", "config", "datadir"]
ARGS_STRATEGY = ["strategy", "strategy_path"] ARGS_STRATEGY = ["strategy", "strategy_path"]
ARGS_MAIN = ARGS_COMMON + ARGS_STRATEGY + ["dynamic_whitelist", "db_url", "sd_notify"] ARGS_MAIN = ARGS_COMMON + ARGS_STRATEGY + ["dynamic_whitelist", "db_url", "sd_notify"]
@ -326,9 +327,9 @@ ARGS_PLOT_PROFIT = (ARGS_COMMON + ARGS_STRATEGY +
class TimeRange(NamedTuple): class TimeRange(NamedTuple):
""" """
NamedTuple Defining timerange inputs. NamedTuple defining timerange inputs.
[start/stop]type defines if [start/stop]ts shall be used. [start/stop]type defines if [start/stop]ts shall be used.
if *type is none, don't use corresponding startvalue. if *type is None, don't use corresponding startvalue.
""" """
starttype: Optional[str] = None starttype: Optional[str] = None
stoptype: Optional[str] = None stoptype: Optional[str] = None