chore: move show_sensitive warning

out of datadir options
This commit is contained in:
Matthias
2026-02-22 19:51:51 +01:00
parent f61b50dbfc
commit b4422131fb

View File

@@ -238,20 +238,13 @@ class Configuration:
)
if not config.get("exportdirectory"):
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"):
# ensure exportfilename is a Path object
config["exportfilename"] = Path(config["exportfilename"])
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:
# This will override the strategy configuration
self._args_to_config(
@@ -319,6 +312,13 @@ class Configuration:
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(
config,
argname="strategy_list",