diff --git a/norminette/rules/is_function_call.py b/norminette/rules/is_function_call.py index fcdcdc2..38ef1ff 100644 --- a/norminette/rules/is_function_call.py +++ b/norminette/rules/is_function_call.py @@ -128,7 +128,9 @@ def run(self, context): expected = "SEMI_COLON" else: expected = SEPARATORS - while not context.check_token(i, expected): + while (not context.check_token(i, expected) + and context.peek_token(i) is not None + ): i += 1 i += 1 i = context.eol(i)