mirror of
https://github.com/davidhalter/jedi.git
synced 2025-12-19 03:55:57 +08:00
fix lambdas in instances
This commit is contained in:
@@ -657,8 +657,8 @@ def follow_call_list(call_list, follow_array=False):
|
|||||||
if isinstance(call, pr.Lambda):
|
if isinstance(call, pr.Lambda):
|
||||||
result.append(er.Function(call))
|
result.append(er.Function(call))
|
||||||
# With things like params, these can also be functions...
|
# With things like params, these can also be functions...
|
||||||
elif isinstance(call, (er.Function, er.Class, er.Instance,
|
elif isinstance(call, pr.Base) and call.isinstance(er.Function,
|
||||||
dynamic.ArrayInstance)):
|
er.Class, er.Instance, dynamic.ArrayInstance):
|
||||||
result.append(call)
|
result.append(call)
|
||||||
# The string tokens are just operations (+, -, etc.)
|
# The string tokens are just operations (+, -, etc.)
|
||||||
elif not isinstance(call, (str, unicode)):
|
elif not isinstance(call, (str, unicode)):
|
||||||
|
|||||||
@@ -178,7 +178,7 @@ class Instance(use_metaclass(cache.CachedMetaClass, Executable)):
|
|||||||
(type(self).__name__, self.base, len(self.var_args or []))
|
(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
|
InstanceElement is a wrapper for any object, that is used as an instance
|
||||||
variable (e.g. self.variable or class methods).
|
variable (e.g. self.variable or class methods).
|
||||||
|
|||||||
Reference in New Issue
Block a user