forked from VimPlug/jedi
Fix the last remaining issues of the first part of the NamePart switch.
This commit is contained in:
@@ -305,7 +305,6 @@ class FakeImport(pr.Import):
|
||||
|
||||
class FakeName(pr.Name):
|
||||
def __init__(self, name_or_names, parent=None, start_pos=(0, 0)):
|
||||
start_pos = 0, 0
|
||||
if isinstance(name_or_names, list):
|
||||
names = [(n, start_pos) for n in name_or_names]
|
||||
else:
|
||||
|
||||
@@ -291,6 +291,12 @@ class InstanceElement(use_metaclass(CachedMetaClass, pr.Base)):
|
||||
return [get_instance_el(self._evaluator, self.instance, command, self.is_class_var)
|
||||
for command in self.var.expression_list()]
|
||||
|
||||
@property
|
||||
@underscore_memoization
|
||||
def name(self):
|
||||
name = self.var.name
|
||||
return helpers.FakeName(unicode(name), self, name.start_pos)
|
||||
|
||||
def __iter__(self):
|
||||
for el in self.var.__iter__():
|
||||
yield get_instance_el(self._evaluator, self.instance, el,
|
||||
|
||||
Reference in New Issue
Block a user