12 lines
349 B
Python
12 lines
349 B
Python
from typing import Protocol
|
|
|
|
|
|
class StateMachine(Protocol):
|
|
def equivalent_to(self, other: "StateMachine") -> bool:
|
|
raise NotImplementedError
|
|
|
|
def can_transition_from(self, old: "StateMachine") -> bool:
|
|
raise NotImplementedError
|
|
|
|
def can_transition_to(self, new: "StateMachine") -> bool:
|
|
raise NotImplementedError |