mirror of
https://github.com/freqtrade/freqtrade.git
synced 2025-11-29 00:23:07 +00:00
refactor: move lookup dictionary outside of loop
This commit is contained in:
@@ -222,11 +222,11 @@ class HyperoptTools:
|
||||
all_spaces = list(params.keys() | non_optimized.keys())
|
||||
spaces = ["buy", "sell", "protection", "roi", "stoploss", "trailing", "max_open_trades"]
|
||||
spaces += [s for s in all_spaces if s not in spaces]
|
||||
lookup = {
|
||||
"roi": "ROI",
|
||||
"trailing": "Trailing stop",
|
||||
}
|
||||
for space in spaces:
|
||||
lookup = {
|
||||
"roi": "ROI",
|
||||
"trailing": "Trailing stop",
|
||||
}
|
||||
name = lookup.get(
|
||||
space, space.capitalize() if space in HYPEROPT_BUILTIN_SPACES else space
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user