Commits

Anonymous committed 28feefa

similarfinder: fixed setting RawSimilarFinder.ast

Comments (0)

Files changed (1)

rope/refactor/similarfinder.py

         self.source = source
         self._matched_asts = {}
         if not hasattr(node, 'region'):
-            self.ast = patchedast.patch_ast(node, source)
+            patchedast.patch_ast(node, source)
+        self.ast = node
 
     def get_matches(self, code, start=0, end=None, skip=None):
         """Search for `code` in source and return a list of `Match`\es