mirror of
https://github.com/davidhalter/jedi.git
synced 2026-05-19 23:09:43 +08:00
Restructure the way we get self arguments (probably reduces executions of object).
This commit is contained in:
@@ -151,8 +151,8 @@ class Instance(use_metaclass(CachedMetaClass, Executed)):
|
|||||||
if unicode(n.names[0]) == self_name and len(n.names) == 2:
|
if unicode(n.names[0]) == self_name and len(n.names) == 2:
|
||||||
add_self_dot_name(n)
|
add_self_dot_name(n)
|
||||||
|
|
||||||
if not isinstance(self.base, compiled.CompiledObject):
|
for s in self.base.py__mro__(self._evaluator):
|
||||||
for s in self.base.py_bases():
|
if not isinstance(s, compiled.CompiledObject):
|
||||||
for inst in self._evaluator.execute(s):
|
for inst in self._evaluator.execute(s):
|
||||||
names += inst.get_self_attributes()
|
names += inst.get_self_attributes()
|
||||||
return names
|
return names
|
||||||
|
|||||||
Reference in New Issue
Block a user