get rid of the whole is_callable stuff, because now we can just check for hasattr(obj, 'py__call__')
This commit is contained in:
1 parent
e58dc0a3d9
commit
7bd76022bf
5 files changed
+3
-31
No files matched your search
+1
-1
@@ -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