From 063469af72e6aa201aa56bd099532b4b6cfce347 Mon Sep 17 00:00:00 2001 From: Mike Felida Date: Sun, 13 Apr 2025 16:07:23 +0200 Subject: [PATCH] Check for None in IsFunctionCall --- norminette/rules/is_function_call.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/norminette/rules/is_function_call.py b/norminette/rules/is_function_call.py index fcdcdc20..38ef1ff1 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)