(self, states, on_enter=None, on_exit=None,
                   ignore_invalid_triggers=None, **kwargs)
Extends transitions.core.Machine.add_states by calling traverse to parse possible
            substates first.
Extends transitions.core.Machine.add_states by calling traverse to parse possible
            substates first.
Extends transitions . core . Machine . add_states by calling traverse to parse possible substates first .
def add_states(self, states, on_enter=None, on_exit=None,
                   ignore_invalid_triggers=None, **kwargs):
        """ Extends transitions.core.Machine.add_states by calling traverse to parse possible
            substates first."""
        # preprocess states to flatten the configuration and resolve nesting
        new_states = self._traverse(states, on_enter=on_enter, on_exit=on_exit,
                                    ignore_invalid_triggers=ignore_invalid_triggers, **kwargs)
        _super(HierarchicalMachine, self).add_states(new_states, on_enter=on_enter, on_exit=on_exit,
                                                     ignore_invalid_triggers=ignore_invalid_triggers,
                                                     **kwargs)

        while self._buffered_transitions:
            args = self._buffered_transitions.pop(0)
            self.add_transition(**args)
def add_states ( self , states , on_enter = None , on_exit = None , ignore_invalid_triggers = None , * * kwargs ) : # preprocess states to flatten the configuration and resolve nesting new_states = self . _traverse ( states , on_enter = on_enter , on_exit = on_exit , ignore_invalid_triggers = ignore_invalid_triggers , * * kwargs ) _super ( HierarchicalMachine , self ) . add_states ( new_states , on_enter = on_enter , on_exit = on_exit , ignore_invalid_triggers = ignore_invalid_triggers , * * kwargs ) while self . _buffered_transitions : args = self . _buffered_transitions . pop ( 0 ) self . add_transition ( * * args )