Commits

Anonymous committed 39dea27

removed check_all parameter of CheckingFinder

Comments (0)

Files changed (3)

rope/refactor/extract.py

 
     def _find_matches(self, collector):
         regions = self._where_to_search()
-        finder = similarfinder.CheckingFinder(self.info.pymodule,
-                                              check_all=False)
+        finder = similarfinder.CheckingFinder(self.info.pymodule)
         matches = []
         for start, end in regions:
             matches.extend((finder.get_matches(collector.body_pattern,

rope/refactor/similarfinder.py

 
     """
 
-    def __init__(self, pymodule, wildcards=None, check_all=True):
-        """Construct a CheckingFinder
-
-        The `check_all` is `False` missing names are ignored.
-
-        """
+    def __init__(self, pymodule, wildcards=None):
+        """Construct a CheckingFinder"""
         self.source = pymodule.source_code
         self.raw_finder = RawSimilarFinder(
             pymodule.source_code, pymodule.get_ast(), self._does_match)
         self.pymodule = pymodule
-        self.check_all = check_all
         if wildcards is None:
             self.wildcards = {}
             for wildcard in [rope.refactor.wildcards.

ropetest/refactor/similarfindertest.py

                                          {'a_class': 'name=mod2.A'}))
         self.assertEquals(1, len(result))
 
-    # XXX: complain if an arg is passed to an unknown wildcard name
-    @testutils.assert_raises(similarfinder.BadNameInCheckError)
-    def xxx_test_reporting_exception_when_bad_checks_are_given(self):
-        self.mod1.write('1\n')
-        pymodule = self.pycore.resource_to_pyobject(self.mod1)
-        finder = similarfinder.CheckingFinder(pymodule)
-        result = list(finder.get_matches('${?a}', {'does_not_exist': 'mod1'}))
-
 
 class TemplateTest(unittest.TestCase):