@@ -26,7 +26,7 @@ private Keyword not_keyword_only_arg_objectapi(Call call, FunctionObject func) {
2626 * plus the number of keyword arguments that do not match keyword-only arguments (if the function does not take **kwargs).
2727 */
2828
29- private int positional_arg_count_for_call_objectapi ( Call call , Object callable ) {
29+ private int positional_arg_count_objectapi_for_call_objectapi ( Call call , Object callable ) {
3030 call = get_a_call_objectapi ( callable ) .getNode ( ) and
3131 exists ( int positional_keywords |
3232 exists ( FunctionObject func | func = get_function_or_initializer ( callable ) |
@@ -40,7 +40,7 @@ private int positional_arg_count_for_call_objectapi(Call call, Object callable)
4040 )
4141}
4242
43- int arg_count ( Call call ) {
43+ int arg_count_objectapi ( Call call ) {
4444 result = count ( call .getAnArg ( ) ) + varargs_length_objectapi ( call ) + count ( call .getAKeyword ( ) )
4545}
4646
@@ -72,7 +72,7 @@ predicate too_few_args(Call call, Object callable, int limit) {
7272 // Exclude cases where an incorrect name is used as that is covered by 'Wrong name for an argument in a call'
7373 not illegally_named_parameter ( call , callable , _) and
7474 not exists ( call .getStarargs ( ) ) and not exists ( call .getKwargs ( ) ) and
75- arg_count ( call ) < limit and
75+ arg_count_objectapi ( call ) < limit and
7676 exists ( FunctionObject func | func = get_function_or_initializer ( callable ) |
7777 call = func .getAFunctionCall ( ) .getNode ( ) and limit = func .minParameters ( ) and
7878 /* The combination of misuse of `mox.Mox().StubOutWithMock()`
@@ -103,7 +103,7 @@ predicate too_many_args(Call call, Object callable, int limit) {
103103 callable instanceof ClassObject and
104104 call .getAFlowNode ( ) = get_a_call_objectapi ( callable ) and limit = func .maxParameters ( ) - 1
105105 ) and
106- positional_arg_count_for_call_objectapi ( call , callable ) > limit
106+ positional_arg_count_objectapi_for_call_objectapi ( call , callable ) > limit
107107}
108108
109109/** Holds if `call` has too many or too few arguments for `func` */
@@ -118,9 +118,9 @@ predicate wrong_args(Call call, FunctionObject func, int limit, string too) {
118118 */
119119 bindingset [ call, func]
120120predicate correct_args_if_called_as_method ( Call call , FunctionObject func ) {
121- arg_count ( call ) + 1 >= func .minParameters ( )
121+ arg_count_objectapi ( call ) + 1 >= func .minParameters ( )
122122 and
123- arg_count ( call ) < func .maxParameters ( )
123+ arg_count_objectapi ( call ) < func .maxParameters ( )
124124}
125125
126126/** Holds if `call` is a call to `overriding`, which overrides `func`. */
0 commit comments