Commits

Anonymous committed 08c437a

evaluate: renamed get_primary_and_pyname_at() to eval_location2

Comments (0)

Files changed (4)

rope/base/evaluate.py

 
 BadIdentifierError = exceptions.BadIdentifierError
 
-def get_primary_and_pyname_at(pymodule, offset):
+def eval_location(pymodule, offset):
+    """Find the pyname at the offset"""
+    return eval_location2(pymodule, offset)[1]
+
+
+def eval_location2(pymodule, offset):
     """Find the primary and pyname at offset"""
     pyname_finder = ScopeNameFinder(pymodule)
     return pyname_finder.get_primary_and_pyname_at(offset)
 
 
-def eval_location(pymodule, offset):
-    """Find the pyname at the offset"""
-    return get_primary_and_pyname_at(pymodule, offset)[1]
-
-
 def get_statement_result(scope, node):
     """Evaluate a `ast.AST` node and return a PyName
 

rope/contrib/findit.py

     """
     name = worder.get_name_at(resource, offset)
     this_pymodule = project.pycore.resource_to_pyobject(resource)
-    primary, pyname = rope.base.evaluate.get_primary_and_pyname_at(
+    primary, pyname = rope.base.evaluate.eval_location2(
         this_pymodule, offset)
     def is_match(occurrence):
         return unsure

rope/refactor/change_signature.py

     def _set_name_and_pyname(self):
         self.name = worder.get_name_at(self.resource, self.offset)
         this_pymodule = self.pycore.resource_to_pyobject(self.resource)
-        self.primary, self.pyname = evaluate.get_primary_and_pyname_at(
+        self.primary, self.pyname = evaluate.eval_location2(
             this_pymodule, self.offset)
         if self.pyname is None:
             return

rope/refactor/rename.py

             self.old_name = worder.get_name_at(self.resource, offset)
             this_pymodule = self.pycore.resource_to_pyobject(self.resource)
             self.old_instance, self.old_pyname = \
-                evaluate.get_primary_and_pyname_at(this_pymodule, offset)
+                evaluate.eval_location2(this_pymodule, offset)
             if self.old_pyname is None:
                 raise exceptions.RefactoringError(
                     'Rename refactoring should be performed'