diff options
author | Bryce Guinta <bryce.paul.guinta@gmail.com> | 2018-07-06 00:16:01 -0600 |
---|---|---|
committer | Bryce Guinta <bryce.paul.guinta@gmail.com> | 2018-07-06 00:16:01 -0600 |
commit | 50c911503e134fa72943b1053fa7ecf8fe907f2f (patch) | |
tree | 38adf2934e8ba2258ede4ae863dad6567364a562 | |
parent | f5685db48bb7c74ed0de0269801781480f5ea9e5 (diff) | |
download | astroid-git-50c911503e134fa72943b1053fa7ecf8fe907f2f.tar.gz |
Fix issue causing a pylint test to fail
-rw-r--r-- | astroid/interpreter/objectmodel.py | 6 |
1 files changed, 6 insertions, 0 deletions
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, |