1
0
forked from VimPlug/jedi

Previously forgot to add the NameParts to used_names. (which had worked before that)

This commit is contained in:
Dave Halter
2014-09-22 23:24:29 +02:00
parent 6819deb404
commit 1d71b25109
2 changed files with 3 additions and 3 deletions

View File

@@ -1,6 +1,7 @@
import copy
from itertools import chain
from jedi._compatibility import unicode
from jedi.parser import representation as pr
from jedi import debug
@@ -196,9 +197,7 @@ def scan_statement_for_calls(stmt, search_name, assignment_details=False):
if isinstance(s_new, pr.Array):
result += scan_array(s_new, search_name)
else:
n = s_new.name
if isinstance(n, pr.Name) \
and search_name in [str(x) for x in n.names]:
if search_name == unicode(s_new.name):
result.append(c)
s_new = s_new.next

View File

@@ -133,6 +133,7 @@ class Parser(object):
def _parse_name(self, pre_used_token=None):
tok = next(self._gen) if pre_used_token is None else pre_used_token
self.module.temp_used_names.append(tok.string)
if tok.type != tokenize.NAME:
return None, tok
return pr.NamePart(self.module, tok.string, None, tok.start_pos), next(self._gen)