@@ -29,7 +29,7 @@ private Keyword not_keyword_only_arg_objectapi(Call call, FunctionObject func) {
2929private 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 |
32- exists ( FunctionObject func | func = get_function_or_initializer ( callable ) |
32+ exists ( FunctionObject func | func = get_function_or_initializer_objectapi ( callable ) |
3333 not func .getFunction ( ) .hasKwArg ( ) and
3434 positional_keywords = count ( not_keyword_only_arg_objectapi ( call , func ) )
3535 or
@@ -52,7 +52,7 @@ private ControlFlowNode get_a_call_objectapi(Object callable) {
5252}
5353
5454/* Gets the function object corresponding to the given class or function*/
55- FunctionObject get_function_or_initializer ( Object func_or_cls ) {
55+ FunctionObject get_function_or_initializer_objectapi ( Object func_or_cls ) {
5656 result = func_or_cls .( FunctionObject )
5757 or
5858 result = func_or_cls .( ClassObject ) .declaredAttribute ( "__init__" )
@@ -64,7 +64,7 @@ predicate illegally_named_parameter(Call call, Object func, string name) {
6464 not func .isC ( ) and
6565 name = call .getANamedArgumentName ( ) and
6666 call .getAFlowNode ( ) = get_a_call_objectapi ( func ) and
67- not get_function_or_initializer ( func ) .isLegalArgumentName ( name )
67+ not get_function_or_initializer_objectapi ( func ) .isLegalArgumentName ( name )
6868}
6969
7070/**Whether there are too few arguments in the `call` to `callable` where `limit` is the lowest number of legal arguments */
@@ -73,7 +73,7 @@ predicate too_few_args(Call call, Object callable, int limit) {
7373 not illegally_named_parameter ( call , callable , _) and
7474 not exists ( call .getStarargs ( ) ) and not exists ( call .getKwargs ( ) ) and
7575 arg_count_objectapi ( call ) < limit and
76- exists ( FunctionObject func | func = get_function_or_initializer ( callable ) |
76+ exists ( FunctionObject func | func = get_function_or_initializer_objectapi ( callable ) |
7777 call = func .getAFunctionCall ( ) .getNode ( ) and limit = func .minParameters ( ) and
7878 /* The combination of misuse of `mox.Mox().StubOutWithMock()`
7979 * and a bug in mox's implementation of methods results in having to
@@ -93,7 +93,7 @@ predicate too_many_args(Call call, Object callable, int limit) {
9393 // Exclude cases where an incorrect name is used as that is covered by 'Wrong name for an argument in a call'
9494 not illegally_named_parameter ( call , callable , _) and
9595 exists ( FunctionObject func |
96- func = get_function_or_initializer ( callable ) and
96+ func = get_function_or_initializer_objectapi ( callable ) and
9797 not func .getFunction ( ) .hasVarArg ( ) and limit >= 0
9898 |
9999 call = func .getAFunctionCall ( ) .getNode ( ) and limit = func .maxParameters ( )
0 commit comments