Ian George committed 7e6a2fc

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

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):
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.