forked from VimPlug/jedi
get rid of the whole is_callable stuff, because now we can just check for hasattr(obj, 'py__call__')
This commit is contained in:
@@ -585,7 +585,7 @@ class Script(object):
|
||||
except (IndexError, AttributeError):
|
||||
pass
|
||||
return [classes.CallSignature(self._evaluator, o, call, index, key_name)
|
||||
for o in origins if o.is_callable()]
|
||||
for o in origins if hasattr(o, 'py__call__')]
|
||||
|
||||
def _analysis(self):
|
||||
#statements = set(chain(*self._parser.module().used_names.values()))
|
||||
|
||||
@@ -335,7 +335,7 @@ class BaseDefinition(object):
|
||||
Otherwise returns a list of `Definition` that represents the params.
|
||||
"""
|
||||
followed = self._follow_statements_imports()
|
||||
if not followed or not followed[0].is_callable():
|
||||
if not followed or not hasattr(followed[0], 'py__call__'):
|
||||
raise AttributeError()
|
||||
followed = followed[0] # only check the first one.
|
||||
|
||||
|
||||
Reference in New Issue
Block a user