1
0
forked from VimPlug/jedi

Restructure ExecutedParam so that it works better with generated instances.

This commit is contained in:
Dave Halter
2014-12-19 12:42:09 +01:00
parent 4a08335fd8
commit e22aed9ef4
2 changed files with 16 additions and 24 deletions

View File

@@ -99,7 +99,7 @@ class Instance(use_metaclass(CachedMetaClass, Executed)):
and compiled.builtin == base.get_parent_until():
# compare the module path with the builtin name.
self.var_args = iterable.check_array_instances(evaluator, self)
else:
elif not is_generated:
# Need to execute the __init__ function, because the dynamic param
# searching needs it.
try:
@@ -157,7 +157,7 @@ class Instance(use_metaclass(CachedMetaClass, Executed)):
if self_name is None:
continue
if sub.name.value == '__init__':
if sub.name.value == '__init__' and not self.is_generated:
# ``__init__`` is special because the params need are injected
# this way. Therefore an execution is necessary.
if not sub.get_decorators():