Commits

Anonymous committed babee50

similarfinder: using region attribute for checking a patched ast

  • Participants
  • Parent commits b44cd49

Comments (0)

Files changed (1)

rope/refactor/similarfinder.py

     def _init_using_ast(self, node, source):
         self.source = source
         self._matched_asts = {}
-        if not hasattr(node, 'sorted_children'):
+        if not hasattr(node, 'region'):
             self.ast = patchedast.patch_ast(node, source)
 
     def get_matches(self, code, start=0, end=None, skip=None):