Commits

Ginés Martínez Sánchez committed 2a08405 Draft

pep-8

Comments (0)

Files changed (1)

ginsfsm/smachine.py

     integer_types,
     iterkeys_,
     itervalues_,
-    )
+)
 
 EMPTY_FSM = {
     'event_list': (),
                 state_names.remove(st_name)
             else:
                 raise MachineError(
-                    "machine state '%s' is NOT in state-list in (%s,%s)" % \
+                    "machine state '%s' is NOT in state-list in (%s,%s)" %
                     (repr(st_name), self.__class__.__name__, self.name))
         if len(state_names):
-            raise MachineError("state-list OVERFILLED: %s in (%s,%s)" %
+            raise MachineError(
+                "state-list OVERFILLED: %s in (%s,%s)" %
                 (repr(state_names), self.__class__.__name__, self.name))
 
         # remove attributes from event_list and move attrs to _event_attr list
                 for ev_name in set_event_names:
                     event_names.remove(ev_name)
                 over = event_names
-            raise MachineError("event-list OVERFILLED: %s in (%s,%s)" %
+            raise MachineError(
+                "event-list OVERFILLED: %s in (%s,%s)" %
                 (repr(over), self.__class__.__name__, self.name))
 
         # check next state names and actions
         for ev_ac in itervalues_(fsm):
             for ev_name, ac, nt in ev_ac:
                 if nt is not None and nt not in state_names:
-                    raise MachineError("next statename '%s' is NOT in "
+                    raise MachineError(
+                        "next statename '%s' is NOT in "
                         "state-list in (%s,%s)" %
                         (repr(nt), self.__class__.__name__, self.name))
                 if ac is not None:
         will be raised.
         """
         if not issubclass(new_state.__class__, (string_types)):
-            raise StateError("set_new_state(\"%s\") invalid TYPE in (%s,%s)" %
+            raise StateError(
+                "set_new_state(\"%s\") invalid TYPE in (%s,%s)" %
                 (repr(new_state), self.__class__.__name__, self.name))
 
         state_id = self._state_index.get(new_state, 0)
         if state_id <= 0:
-            raise StateError("ERROR set_new_state %r UNKNOWN in (%s,%s)" %
+            raise StateError(
+                "ERROR set_new_state %r UNKNOWN in (%s,%s)" %
                 (new_state, self.__class__.__name__, self.name))
         self._set_new_state(state_id)
 
             event_name = event
         else:
             if not hasattr(event, 'event_name'):
-                raise EventError("inject_event(\"%s\") invalid TYPE in (%s,%s)"
+                raise EventError(
+                    "inject_event(\"%s\") invalid TYPE in (%s,%s)"
                     % (self.__class__.__name__, self.name, repr(event)))
             event_name = event.event_name