summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorClaudiu Popa <pcmanticore@gmail.com>2019-06-01 09:27:19 +0200
committerClaudiu Popa <pcmanticore@gmail.com>2019-06-01 09:27:19 +0200
commit8d7a02784dfc3eb533b44779cc87b6f90aa47236 (patch)
tree3d1eb2b459860e9a822c70bd661f4515341fb156
parent7cc9da97285deb3b0213c9f2b403ae21f7b5c5c2 (diff)
downloadpylint-git-8d7a02784dfc3eb533b44779cc87b6f90aa47236.tar.gz
Only unpack the proxied function for bound methods with unbound methods
-rw-r--r--pylint/checkers/typecheck.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/pylint/checkers/typecheck.py b/pylint/checkers/typecheck.py
index 85454c4a0..aaafaae59 100644
--- a/pylint/checkers/typecheck.py
+++ b/pylint/checkers/typecheck.py
@@ -967,7 +967,9 @@ accessed. Python regular expressions are accepted.",
):
return
- if isinstance(function_node, astroid.BoundMethod):
+ if isinstance(function_node, astroid.BoundMethod) and isinstance(
+ function_node._proxied, astroid.UnboundMethod
+ ):
# Unwrap to get the actual function object
function_node = function_node._proxied._proxied