| Index: third_party/pylint/checkers/typecheck.py
|
| diff --git a/third_party/pylint/checkers/typecheck.py b/third_party/pylint/checkers/typecheck.py
|
| index 10b9f8669fb9353ab9e4766e5174a6ef5a257078..9f074ae05f6cfd662e8f246ce7b2274cb2359adf 100644
|
| --- a/third_party/pylint/checkers/typecheck.py
|
| +++ b/third_party/pylint/checkers/typecheck.py
|
| @@ -344,11 +344,16 @@ accessed. Python regular expressions are accepted.'}
|
| if not isinstance(attr, astroid.Function):
|
| continue
|
|
|
| - # Decorated, see if it is decorated with a property
|
| + # Decorated, see if it is decorated with a property.
|
| + # Also, check the returns and see if they are callable.
|
| if decorated_with_property(attr):
|
| - self.add_message('not-callable', node=node,
|
| - args=node.func.as_string())
|
| - break
|
| + if all(return_node.callable()
|
| + for return_node in attr.infer_call_result(node)):
|
| + continue
|
| + else:
|
| + self.add_message('not-callable', node=node,
|
| + args=node.func.as_string())
|
| + break
|
|
|
| @check_messages(*(list(MSGS.keys())))
|
| def visit_callfunc(self, node):
|
|
|