chore: move show_sensitive warning
out of datadir options
This commit is contained in:
@@ -238,20 +238,13 @@ class Configuration:
|
|||||||
)
|
)
|
||||||
if not config.get("exportdirectory"):
|
if not config.get("exportdirectory"):
|
||||||
config["exportdirectory"] = config["user_data_dir"] / "backtest_results"
|
config["exportdirectory"] = config["user_data_dir"] / "backtest_results"
|
||||||
if not config.get("exportfilename"):
|
|
||||||
config["exportfilename"] = None
|
config["exportfilename"] = config.get("exportfilename", None)
|
||||||
if config.get("exportfilename"):
|
if config.get("exportfilename"):
|
||||||
# ensure exportfilename is a Path object
|
# ensure exportfilename is a Path object
|
||||||
config["exportfilename"] = Path(config["exportfilename"])
|
config["exportfilename"] = Path(config["exportfilename"])
|
||||||
config["exportdirectory"] = Path(config["exportdirectory"])
|
config["exportdirectory"] = Path(config["exportdirectory"])
|
||||||
|
|
||||||
if self.args.get("show_sensitive"):
|
|
||||||
logger.warning(
|
|
||||||
"Sensitive information will be shown in the upcoming output. "
|
|
||||||
"Please make sure to never share this output without redacting "
|
|
||||||
"the information yourself."
|
|
||||||
)
|
|
||||||
|
|
||||||
def _process_optimize_options(self, config: Config) -> None:
|
def _process_optimize_options(self, config: Config) -> None:
|
||||||
# This will override the strategy configuration
|
# This will override the strategy configuration
|
||||||
self._args_to_config(
|
self._args_to_config(
|
||||||
@@ -319,6 +312,13 @@ class Configuration:
|
|||||||
|
|
||||||
self._process_datadir_options(config)
|
self._process_datadir_options(config)
|
||||||
|
|
||||||
|
if self.args.get("show_sensitive"):
|
||||||
|
logger.warning(
|
||||||
|
"Sensitive information will be shown in the upcoming output. "
|
||||||
|
"Please make sure to never share this output without redacting "
|
||||||
|
"the information yourself."
|
||||||
|
)
|
||||||
|
|
||||||
self._args_to_config(
|
self._args_to_config(
|
||||||
config,
|
config,
|
||||||
argname="strategy_list",
|
argname="strategy_list",
|
||||||
|
|||||||
Reference in New Issue
Block a user