Dont' use classProperty - that's not supported on 3.8

This commit is contained in:
Matthias 2022-08-20 10:55:52 +02:00
parent 665cf4431d
commit aa3da092a0

View File

@ -35,16 +35,11 @@ def hyperopt_serializer(x):
class HyperoptStateContainer(): class HyperoptStateContainer():
""" Singleton class to track state of hyperopt""" """ Singleton class to track state of hyperopt"""
__state = HyperoptState.OPTIMIZE state: HyperoptState = HyperoptState.OPTIMIZE
@classmethod @classmethod
def set_state(cls, value: HyperoptState): def set_state(cls, value: HyperoptState):
cls.__state = value cls.state = value
@classmethod
@property
def state(cls) -> HyperoptState:
return cls.__state
class HyperoptTools(): class HyperoptTools():