cleanup Arguments: name attrs and methods as non-public

This commit is contained in:
hroff-1902
2019-07-18 17:55:35 +03:00
parent fbd229810f
commit 7af24dc486
5 changed files with 29 additions and 32 deletions

View File

@@ -22,12 +22,12 @@ logger = logging.getLogger('download_backtest_data')
DEFAULT_DL_PATH = 'user_data/data'
arguments = Arguments(sys.argv[1:], 'Download backtest data')
arguments.build_args(ARGS_DOWNLOADER)
# Do not read the default config if config is not specified
# in the command line options explicitely
args = arguments.parse_args(no_default_config=True)
arguments = Arguments(sys.argv[1:], 'Download backtest data',
no_default_config=True)
arguments._build_args(optionlist=ARGS_DOWNLOADER)
args = arguments._parse_args()
# Use bittrex as default exchange
exchange_name = args.exchange or 'bittrex'

View File

@@ -89,9 +89,8 @@ def plot_parse_args(args: List[str]) -> Dict[str, Any]:
:return: args: Array with all arguments
"""
arguments = Arguments(args, 'Graph dataframe')
arguments.build_args(optionlist=ARGS_PLOT_DATAFRAME)
parsed_args = arguments.parse_args()
arguments._build_args(optionlist=ARGS_PLOT_DATAFRAME)
parsed_args = arguments._parse_args()
# Load the configuration
config = setup_configuration(parsed_args, RunMode.OTHER)

View File

@@ -42,9 +42,8 @@ def plot_parse_args(args: List[str]) -> Dict[str, Any]:
:return: args: Array with all arguments
"""
arguments = Arguments(args, 'Graph profits')
arguments.build_args(optionlist=ARGS_PLOT_PROFIT)
parsed_args = arguments.parse_args()
arguments._build_args(optionlist=ARGS_PLOT_PROFIT)
parsed_args = arguments._parse_args()
# Load the configuration
config = setup_configuration(parsed_args, RunMode.OTHER)