pytransitions / transitions

A lightweight, object-oriented finite state machine implementation in Python with many extensions
MIT License
5.49k stars 524 forks source link

get_transitions does not support enum sources or destinations #491

Closed thedrow closed 3 years ago

thedrow commented 3 years ago

get_transitions currently assumes that the source and dest keyword arguments are strings. I think they can be enums too.

aleneum commented 3 years ago

I added support for Enum and State in d1c18cd. Furthermore, HierarchicalMachine.get_transitions has a new keyword delegate (default value is False). If set to True, get_transitions will also return transitions from the parent of source.