1
0
forked from VimPlug/jedi

cleanup and last fixes -> fixes #68

This commit is contained in:
David Halter
2012-11-24 02:57:32 +01:00
parent 7be9b8d923
commit 4df89f0272

View File

@@ -508,7 +508,6 @@ class Execution(Executable):
# otherwise it would be a metaclass # otherwise it would be a metaclass
if len(self.var_args) == 1: if len(self.var_args) == 1:
objects = follow_call_list([self.var_args[0]]) objects = follow_call_list([self.var_args[0]])
print 'LALA', objects, [o.base for o in objects if isinstance(o, Instance)]
return [o.base for o in objects if isinstance(o, Instance)] return [o.base for o in objects if isinstance(o, Instance)]
if self.base.isinstance(Class): if self.base.isinstance(Class):
@@ -736,8 +735,11 @@ class Execution(Executable):
def _scope_copy(self, scope): def _scope_copy(self, scope):
try: try:
""" Copies a scope (e.g. if) in an execution """ """ Copies a scope (e.g. if) in an execution """
# TODO This method uses different scopes than the subscopes property. # TODO method uses different scopes than the subscopes property.
if scope == self.base or scope == self.base.base_func:
# just check the start_pos, sometimes it's difficult with closures
# to compare the scopes directly.
if scope.start_pos == self.start_pos:
return self return self
else: else:
copied = helpers.fast_parent_copy(scope) copied = helpers.fast_parent_copy(scope)