From 50c911503e134fa72943b1053fa7ecf8fe907f2f Mon Sep 17 00:00:00 2001 From: Bryce Guinta Date: Fri, 6 Jul 2018 00:16:01 -0600 Subject: Fix issue causing a pylint test to fail --- astroid/interpreter/objectmodel.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/astroid/interpreter/objectmodel.py b/astroid/interpreter/objectmodel.py index f6a53e34..7de267d1 100644 --- a/astroid/interpreter/objectmodel.py +++ b/astroid/interpreter/objectmodel.py @@ -308,6 +308,12 @@ class FunctionModel(ObjectModel): "Invalid class inferred", target=self, context=context) + # For some reason func is a Node that the below + # code is not expecting + if isinstance(func, bases.BoundMethod): + yield func + return + # Rebuild the original value, but with the parent set as the # class where it will be bound. new_func = func.__class__(name=func.name, doc=func.doc, -- cgit v1.2.1