Commits

Anonymous committed 2660148

fixmodnames: added task_handle argument to get_changes()

Comments (0)

Files changed (1)

rope/contrib/fixmodnames.py

-from rope.base import change
+from rope.base import change, taskhandle
 from rope.contrib import changestack
 from rope.refactor import rename
 
     def __init__(self, project):
         self.project = project
 
-    def get_changes(self, fix=str.lower):
+    def get_changes(self, fix=str.lower,
+                    task_handle=taskhandle.NullTaskHandle()):
         stack = changestack.ChangeStack(self.project, 'Fixing module names')
         try:
             while True:
                         modname = resource.parent.name
                     if modname != fix(modname):
                         renamer = rename.Rename(self.project, resource)
-                        changes = renamer.get_changes(modname.lower())
+                        changes = renamer.get_changes(modname.lower(),
+                                                      task_handle=handle)
                         stack.push(changes)
                         break
                 else: