diff --git a/jedi/parsing.py b/jedi/parsing.py index 9e7d2471..0b70f612 100644 --- a/jedi/parsing.py +++ b/jedi/parsing.py @@ -751,7 +751,6 @@ class Statement(Simple): close_brackets = False if type(result) == Call: result = result.parent() - close_brackets = False call = Call(tok, c_type, start_pos, parent=result) result.add_to_current_field(call) result = call @@ -765,7 +764,7 @@ class Statement(Simple): result = Array(start_pos, brackets[tok], parent=result) result.parent().add_to_current_field(result) elif tok == ':': - if is_call_or_close(): + while is_call_or_close(): result = result.parent() close_brackets = False if result.type == Array.LIST: # [:] lookups diff --git a/test/completion/arrays.py b/test/completion/arrays.py index 9c8a143d..b9ddcb61 100644 --- a/test/completion/arrays.py +++ b/test/completion/arrays.py @@ -30,6 +30,9 @@ b[8-7] #? list() b[8:] +#? list() +b[int():] + # ----------------- # iterable multiplication