Ian George committed 7e6a2fc

Changing some instances of .items() to .values()

  • Participants
  • Parent commits 600f9cb

Comments (0)

Files changed (2)


 from django.db import models
-from fsm import FSM
+from statemachine.fsm import FSM
 from django.forms.forms import pretty_name
 DEFAULT_STATE = "start"


     'base_states', taking into account parent class 'base_states' as well.
-    def __new__(cls, name, bases, attrs):
+    def __new__(mcs, name, bases, attrs):
         attrs['base_states'] = get_declared_states(bases, attrs)
         new_class = super(
         self.dbg = None
         self.verify_on_execute = verify_on_execute
-        for k, s in self.states.items():
+        for s in self.states.values():
             if '*' in s.exit_states:
                 s.exit_states = [key for key in self.states.keys()]
         bad_states = []
         state_names = set(self.states.keys())
-        for name, state in self.states.items():
+        for state in self.states.values():
             bad_states.extend(set(state.exit_states) - state_names)
         if len(bad_states):