forked from VimPlug/jedi
Make sure to use _stub_to_python_value_set for all conversions, see #1466
This commit is contained in:
@@ -79,6 +79,13 @@ class AbstractNameDefinition(object):
|
||||
def api_type(self):
|
||||
return self.parent_context.api_type
|
||||
|
||||
def get_defining_qualified_value(self):
|
||||
"""
|
||||
Returns either None or the value that is public and qualified. Won't
|
||||
return a function, because a name in a function is never public.
|
||||
"""
|
||||
return None
|
||||
|
||||
|
||||
class AbstractArbitraryName(AbstractNameDefinition):
|
||||
"""
|
||||
@@ -124,6 +131,15 @@ class AbstractTreeName(AbstractNameDefinition):
|
||||
return None
|
||||
return parent_names + (self.tree_name.value,)
|
||||
|
||||
def get_defining_qualified_value(self):
|
||||
if self.is_import():
|
||||
raise 1
|
||||
elif self.parent_context:
|
||||
values = self.parent_context.name.infer()
|
||||
if len(values) == 1:
|
||||
return next(iter(values))
|
||||
return None
|
||||
|
||||
def goto(self):
|
||||
context = self.parent_context
|
||||
name = self.tree_name
|
||||
|
||||
Reference in New Issue
Block a user