have Arguments return a dict instead of Namespace
This commit is contained in:
@@ -1,18 +1,18 @@
|
||||
from argparse import Namespace
|
||||
from typing import Any, Dict
|
||||
|
||||
from freqtrade import OperationalException
|
||||
from freqtrade.state import RunMode
|
||||
from freqtrade.utils import setup_utils_configuration
|
||||
|
||||
|
||||
def validate_plot_args(args: Namespace):
|
||||
args_tmp = vars(args)
|
||||
if not args_tmp.get('datadir') and not args_tmp.get('config'):
|
||||
def validate_plot_args(args: Dict[str, Any]):
|
||||
if not args.get('datadir') and not args.get('config'):
|
||||
raise OperationalException(
|
||||
"You need to specify either `--datadir` or `--config` "
|
||||
"for plot-profit and plot-dataframe.")
|
||||
|
||||
|
||||
def start_plot_dataframe(args: Namespace) -> None:
|
||||
def start_plot_dataframe(args: Dict[str, Any]) -> None:
|
||||
"""
|
||||
Entrypoint for dataframe plotting
|
||||
"""
|
||||
@@ -24,7 +24,7 @@ def start_plot_dataframe(args: Namespace) -> None:
|
||||
load_and_plot_trades(config)
|
||||
|
||||
|
||||
def start_plot_profit(args: Namespace) -> None:
|
||||
def start_plot_profit(args: Dict[str, Any]) -> None:
|
||||
"""
|
||||
Entrypoint for plot_profit
|
||||
"""
|
||||
|
Reference in New Issue
Block a user