Right now, FiniteStateDevices require that an Enum class containing all of the states of the device be supplied to it via constructor. It is possible to define an Abstract class called States and force it to be implemented. This way we can eliminate the need to explicitly reference the State inner class in the subclasses of FiniteStateDevice.
class FiniteStateDevice(StateDevice, ABC):
"""
A subclass of StateDevice that adds support for explicit state ordering and transitions
"""
class State(enum.Enum):
raise NotImplementedError
Right now, FiniteStateDevices require that an Enum class containing all of the states of the device be supplied to it via constructor. It is possible to define an Abstract class called States and force it to be implemented. This way we can eliminate the need to explicitly reference the State inner class in the subclasses of FiniteStateDevice.