diff --git a/jedi/evaluate.py b/jedi/evaluate.py index 142852bc..388a8e0a 100644 --- a/jedi/evaluate.py +++ b/jedi/evaluate.py @@ -657,8 +657,8 @@ def follow_call_list(call_list, follow_array=False): if isinstance(call, pr.Lambda): result.append(er.Function(call)) # With things like params, these can also be functions... - elif isinstance(call, (er.Function, er.Class, er.Instance, - dynamic.ArrayInstance)): + elif isinstance(call, pr.Base) and call.isinstance(er.Function, + er.Class, er.Instance, dynamic.ArrayInstance): result.append(call) # The string tokens are just operations (+, -, etc.) elif not isinstance(call, (str, unicode)): diff --git a/jedi/evaluate_representation.py b/jedi/evaluate_representation.py index c79fdee7..8446f80e 100644 --- a/jedi/evaluate_representation.py +++ b/jedi/evaluate_representation.py @@ -178,7 +178,7 @@ class Instance(use_metaclass(cache.CachedMetaClass, Executable)): (type(self).__name__, self.base, len(self.var_args or [])) -class InstanceElement(use_metaclass(cache.CachedMetaClass)): +class InstanceElement(use_metaclass(cache.CachedMetaClass, pr.Base)): """ InstanceElement is a wrapper for any object, that is used as an instance variable (e.g. self.variable or class methods).