diff --git a/jedi/parsing.py b/jedi/parsing.py index d760053e..1b61f86b 100644 --- a/jedi/parsing.py +++ b/jedi/parsing.py @@ -768,7 +768,7 @@ class Statement(Simple): is_chain = False continue elif tok == 'as': - next(tok_iter) + next(tok_iter, None) continue brackets = {'(': Array.TUPLE, '[': Array.LIST, '{': Array.SET}