From bde867916392723c5004351f8bb391a82622d209 Mon Sep 17 00:00:00 2001 From: Bob Mottram Date: Fri, 12 Aug 2022 12:22:19 +0100 Subject: [PATCH] Function return type --- tests.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/tests.py b/tests.py index 0d1eb1924..99bbc38d2 100644 --- a/tests.py +++ b/tests.py @@ -4756,13 +4756,13 @@ def get_function_calls(name: str, lines: [], start_line_ctr: int, return calls_functions -def _function_args_match(call_args: [], func_args: []): - """Do the function arguments match the function call arguments +def _function_args_match(call_args: [], func_args: []) -> bool: + """Do the function arguments match the function call arguments? """ if len(call_args) == len(func_args): return True - # count non-optional arguments + # count non-optional arguments in function call call_args_ctr = 0 for arg1 in call_args: if arg1 == 'self': @@ -4770,6 +4770,7 @@ def _function_args_match(call_args: [], func_args: []): if '=' not in arg1 or arg1.startswith("'"): call_args_ctr += 1 + # count non-optional arguments in function def func_args_ctr = 0 for arg2 in func_args: if arg2 == 'self':