Closed LogicEnthusiast closed 3 years ago
Hello @qalexma,
What is the recommended way to deal with lack of type ahead/code completion in the IDE for "triggers"?
You can add docstrings to your models that IDEs can use for code completion (see #426) or you can customize a Machine to generate docstrings for you (see #383). Considering naming, you can adjust method naming by overidding Machine._add_model_to_state
(see #385).
thank you!!
Great library! What is the recommended way to deal with lack of type ahead/code completion in the IDE for "triggers"?
Given the machine like so
Using enum class for States helps to resolve the code completion for States. But for triggers, you still have to say
m= Fsm() m.start()
or
m.to_LOGIN() m.to_IDLE()
which is error prone and not easy to remember all the sates when there are many of those.
Thank you!!