def _validate_transition_start_states(self): """Raise an error if transition start states are missing.""" for state in self.states: if state not in self.transitions: raise exceptions.MissingStateError( 'transition start state {} is missing'.format( state))
def _validate_initial_state_transitions(self): """Raise an error if the initial state has no transitions defined.""" if self.initial_state not in self.transitions: raise exceptions.MissingStateError( 'initial state {} has no transitions defined'.format( self.initial_state))