mirror of
https://github.com/freqtrade/freqtrade.git
synced 2025-12-17 05:11:15 +00:00
chore: use fstring in strategy helper
This commit is contained in:
@@ -87,7 +87,7 @@ class StrategyResolver(IResolver):
|
|||||||
# Loop this list again to have output combined
|
# Loop this list again to have output combined
|
||||||
for attribute, _ in attributes:
|
for attribute, _ in attributes:
|
||||||
if attribute in config:
|
if attribute in config:
|
||||||
logger.info("Strategy using %s: %s", attribute, config[attribute])
|
logger.info(f"Strategy using {attribute}: {config[attribute]}")
|
||||||
|
|
||||||
StrategyResolver._normalize_attributes(strategy)
|
StrategyResolver._normalize_attributes(strategy)
|
||||||
|
|
||||||
@@ -109,9 +109,7 @@ class StrategyResolver(IResolver):
|
|||||||
# Ensure Properties are not overwritten
|
# Ensure Properties are not overwritten
|
||||||
setattr(strategy, attribute, config[attribute])
|
setattr(strategy, attribute, config[attribute])
|
||||||
logger.info(
|
logger.info(
|
||||||
"Override strategy '%s' with value in config file: %s.",
|
f"Override strategy '{attribute}' with value in config file: {config[attribute]}.",
|
||||||
attribute,
|
|
||||||
config[attribute],
|
|
||||||
)
|
)
|
||||||
elif hasattr(strategy, attribute):
|
elif hasattr(strategy, attribute):
|
||||||
val = getattr(strategy, attribute)
|
val = getattr(strategy, attribute)
|
||||||
|
|||||||
Reference in New Issue
Block a user