1
0
forked from VimPlug/jedi

Adding prev_sibling, getting self attributes.

This commit is contained in:
Dave Halter
2014-10-23 14:03:52 +02:00
parent 88dcbe1f48
commit 387fc3b038
4 changed files with 29 additions and 6 deletions
+6 -5
View File
@@ -155,13 +155,14 @@ class Instance(use_metaclass(CachedMetaClass, Executed)):
# because to follow them and their self variables is too
# complicated.
sub = self._get_method_execution(sub)
print(sub.names_dict.values())
for name_list in sub.names_dict.values():
for name in name_list:
if name.value == self_name:
next = name.next_sibling()
if isinstance(next, pr.Name) and next.is_definition():
names.append(get_instance_el(self._evaluator, self, next))
if name.value == self_name and name.prev_sibling() is None:
trailer = name.next_sibling()
if pr.is_node(trailer, 'trailer') \
and len(trailer.children) == 2:
name = trailer.children[1] # After dot.
names.append(get_instance_el(self._evaluator, self, name))
for s in self.base.py__bases__(self._evaluator):
if not isinstance(s, compiled.CompiledObject):