From de064505c525dd57087cffea41fe2c7658301226 Mon Sep 17 00:00:00 2001 From: Achmad Fathoni Date: Sun, 5 Apr 2026 21:30:37 +0700 Subject: [PATCH] Enforce SKDecimal 'name' parameter as string --- freqtrade/optimize/space/decimalspace.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/freqtrade/optimize/space/decimalspace.py b/freqtrade/optimize/space/decimalspace.py index dc6dba04d..d1036bb93 100644 --- a/freqtrade/optimize/space/decimalspace.py +++ b/freqtrade/optimize/space/decimalspace.py @@ -9,7 +9,7 @@ class SKDecimal(FloatDistribution): *, step: float | None = None, decimals: int | None = None, - name=None, + name: str | None = None, ): """ FloatDistribution with a fixed step size. @@ -26,7 +26,7 @@ class SKDecimal(FloatDistribution): raise ValueError("You must set one of decimals or step") # Convert decimals to step self.step = step or (1 / 10**decimals if decimals else 1) - self.name = name + self.name = name or "" super().__init__( low=round(low, decimals) if decimals else low,