forked from VimPlug/jedi
_get_definition -> get_definition in parso.
This commit is contained in:
@@ -444,7 +444,7 @@ class Evaluator(object):
|
||||
return types
|
||||
|
||||
def goto_definitions(self, context, name):
|
||||
def_ = name._get_definition(import_name_always=True)
|
||||
def_ = name.get_definition(import_name_always=True)
|
||||
if def_ is not None:
|
||||
type_ = def_.type
|
||||
if type_ == 'classdef':
|
||||
@@ -468,7 +468,7 @@ class Evaluator(object):
|
||||
return helpers.evaluate_call_of_leaf(context, name)
|
||||
|
||||
def goto(self, context, name):
|
||||
definition = name._get_definition(import_name_always=True)
|
||||
definition = name.get_definition(import_name_always=True)
|
||||
if definition is not None:
|
||||
type_ = definition.type
|
||||
if type_ == 'expr_stmt':
|
||||
|
||||
@@ -89,7 +89,7 @@ class TreeNameDefinition(AbstractTreeName):
|
||||
|
||||
@property
|
||||
def api_type(self):
|
||||
definition = self.tree_name._get_definition()
|
||||
definition = self.tree_name.get_definition()
|
||||
if definition is None:
|
||||
definition = self.tree_name.parent
|
||||
if definition.type == 'dotted_as_name':
|
||||
|
||||
@@ -173,7 +173,7 @@ class NameFinder(object):
|
||||
|
||||
def _name_to_types(evaluator, context, tree_name):
|
||||
types = []
|
||||
node = tree_name._get_definition()
|
||||
node = tree_name.get_definition()
|
||||
if node is None:
|
||||
node = tree_name.parent
|
||||
if node.type == 'global_stmt':
|
||||
|
||||
Reference in New Issue
Block a user