1
0
forked from VimPlug/jedi

Issue with numbers after names in call signatures. It would cause Jedi to stop analysing call signatures. Fixes #510

This commit is contained in:
Dave Halter
2015-04-10 02:17:12 +02:00
parent 7a22d374ca
commit 47bf1c5daf
2 changed files with 18 additions and 0 deletions

View File

@@ -185,6 +185,10 @@ class UserContext(object):
if tok_str in tokenize.ALWAYS_BREAK_TOKENS:
break
elif next_must_be_name:
if tok_type == tokenize.NUMBER:
# If there's a number at the end of the string, it will be
# tokenized as a number. So add it to the name.
tok_type, t, _, _ = next(generator)
if tok_type == tokenize.NAME:
end_pos = start_pos[0], start_pos[1] + len(tok_str)
call, start_pos = self._calc_path_until_cursor(start_pos=end_pos)