1
0
forked from VimPlug/jedi

Fix ellipsis issues of python2.

This commit is contained in:
Dave Halter
2017-07-16 20:07:49 +02:00
parent 54490be1b2
commit 7e4504efbd
3 changed files with 19 additions and 4 deletions
+3 -1
View File
@@ -310,7 +310,9 @@ class Evaluator(object):
self.eval_element(context, element.children[-1]))
elif typ == 'operator':
# Must be an ellipsis, other operators are not evaluated.
assert element.value == '...'
# In Python 2 ellipsis is coded as three single dot tokens, not
# as one token 3 dot token.
assert element.value in ('.', '...')
types = set([compiled.create(self, Ellipsis)])
elif typ == 'dotted_name':
types = self.eval_atom(context, element.children[0])