forked from VimPlug/jedi
find_references -> get_references, see #1476
This commit is contained in:
@@ -363,10 +363,10 @@ class Script(object):
|
||||
|
||||
def usages(self, **kwargs):
|
||||
# Deprecated, will be removed.
|
||||
return self.find_references(*self._pos, **kwargs)
|
||||
return self.get_references(*self._pos, **kwargs)
|
||||
|
||||
@validate_line_column
|
||||
def find_references(self, line=None, column=None, **kwargs):
|
||||
def get_references(self, line=None, column=None, **kwargs):
|
||||
"""
|
||||
Return :class:`classes.Definition` objects, which contain all
|
||||
names that point to the definition of the name under the cursor. This
|
||||
|
||||
+2
-2
@@ -57,7 +57,7 @@ def rename(script, new_name):
|
||||
:param script: The source Script object.
|
||||
:return: list of changed lines/changed files
|
||||
"""
|
||||
return Refactoring(_rename(script.find_references(), new_name))
|
||||
return Refactoring(_rename(script.get_references(), new_name))
|
||||
|
||||
|
||||
def _rename(names, replace_str):
|
||||
@@ -169,7 +169,7 @@ def inline(script):
|
||||
definitions = script.goto()
|
||||
assert len(definitions) == 1
|
||||
stmt = definitions[0]._definition
|
||||
references = script.find_references()
|
||||
references = script.get_references()
|
||||
inlines = [r for r in references
|
||||
if not stmt.start_pos <= (r.line, r.column) <= stmt.end_pos]
|
||||
inlines = sorted(inlines, key=lambda x: (x.module_path, x.line, x.column),
|
||||
|
||||
Reference in New Issue
Block a user