diff options
author | Claudiu Popa <pcmanticore@gmail.com> | 2019-06-01 09:27:19 +0200 |
---|---|---|
committer | Claudiu Popa <pcmanticore@gmail.com> | 2019-06-01 09:27:19 +0200 |
commit | 8d7a02784dfc3eb533b44779cc87b6f90aa47236 (patch) | |
tree | 3d1eb2b459860e9a822c70bd661f4515341fb156 | |
parent | 7cc9da97285deb3b0213c9f2b403ae21f7b5c5c2 (diff) | |
download | pylint-git-8d7a02784dfc3eb533b44779cc87b6f90aa47236.tar.gz |
Only unpack the proxied function for bound methods with unbound methods
-rw-r--r-- | pylint/checkers/typecheck.py | 4 |
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 |