summaryrefslogtreecommitdiff
path: root/inference.py
diff options
context:
space:
mode:
authorEmile Anclin <emile.anclin@logilab.fr>2008-10-01 19:48:49 +0200
committerEmile Anclin <emile.anclin@logilab.fr>2008-10-01 19:48:49 +0200
commit2b71d191001f8adc96ae0edd03a4fb3367376a9c (patch)
tree4ca7c8850e419a433039b609ac10e119d55a3897 /inference.py
parent1ef45205b0fcbe81f164c270270315f17db1352f (diff)
downloadastroid-git-2b71d191001f8adc96ae0edd03a4fb3367376a9c.tar.gz
don't rewrap instance
Diffstat (limited to 'inference.py')
-rw-r--r--inference.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/inference.py b/inference.py
index cee88fe2..5cac77ea 100644
--- a/inference.py
+++ b/inference.py
@@ -136,7 +136,9 @@ class CallContext:
# XXX can do better ?
boundnode = funcnode.parent.frame()
if funcnode.type == 'method':
- return iter((Instance(boundnode),))
+ if not isinstance(boundnode, Instance):
+ boundnode = Instance(boundnode)
+ return iter((boundnode,))
if funcnode.type == 'classmethod':
return iter((boundnode,))
# 2. search arg index