1
0
forked from VimPlug/jedi

ExecutedParams should never be additionally faked, even if they are the first params. They have been legitimately created by a caller.

This commit is contained in:
Dave Halter
2014-06-30 15:22:53 +02:00
parent 0d3ea4dfb4
commit 0b99473886
4 changed files with 18 additions and 3 deletions
+3 -1
View File
@@ -296,7 +296,9 @@ class NameFinder(object):
cls = func.parent.get_parent_until((pr.Class, pr.Function))
if isinstance(cls, pr.Class) and param.position_nr == 0:
from jedi.evaluate.param import ExecutedParam
if isinstance(cls, pr.Class) and param.position_nr == 0 \
and not isinstance(param, ExecutedParam):
# This is where we add self - if it has never been
# instantiated.
if isinstance(self.scope, er.InstanceElement):