Improve some typing

This commit is contained in:
Matthias
2022-05-25 20:43:43 +02:00
parent 3e66275c98
commit 537d10c627
5 changed files with 11 additions and 5 deletions

View File

@@ -69,7 +69,7 @@ class HyperStrategyMixin:
@classmethod
def detect_all_parameters(cls) -> Dict:
""" Detect all parameters and return them as a list"""
params: Dict = {
params: Dict[str, Any] = {
'buy': list(cls.detect_parameters('buy')),
'sell': list(cls.detect_parameters('sell')),
'protection': list(cls.detect_parameters('protection')),
@@ -148,7 +148,7 @@ class HyperStrategyMixin:
"""
Returns list of Parameters that are not part of the current optimize job
"""
params = {
params: Dict[str, Dict] = {
'buy': {},
'sell': {},
'protection': {},

View File

@@ -97,6 +97,8 @@ class NumericParameter(BaseParameter):
class IntParameter(NumericParameter):
default: int
value: int
low: int
high: int
def __init__(self, low: Union[int, Sequence[int]], high: Optional[int] = None, *, default: int,
space: Optional[str] = None, optimize: bool = True, load: bool = True, **kwargs):