Skip to content

Commit 3a764ad

Browse files
committed
Swaps too_many_args globally
1 parent 3b0be46 commit 3a764ad

File tree

3 files changed

+4
-4
lines changed

3 files changed

+4
-4
lines changed

python/ql/src/Classes/WrongNumberArgumentsInClassInstantiation.ql

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ import Expressions.CallArgs
1818
from Call call, ClassObject cls, string too, string should, int limit, FunctionObject init
1919
where
2020
(
21-
too_many_args(call, cls, limit) and too = "too many arguments" and should = "no more than "
21+
too_many_args_objectapi(call, cls, limit) and too = "too many arguments" and should = "no more than "
2222
or
2323
too_few_args_objectapi(call, cls, limit) and too = "too few arguments" and should = "no fewer than "
2424
) and init = get_function_or_initializer_objectapi(cls)

python/ql/src/Expressions/CallArgs.qll

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ predicate too_few_args_objectapi(Call call, Object callable, int limit) {
8989
}
9090

9191
/**Whether there are too many arguments in the `call` to `func` where `limit` is the highest number of legal arguments */
92-
predicate too_many_args(Call call, Object callable, int limit) {
92+
predicate too_many_args_objectapi(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_objectapi(call, callable, _) and
9595
exists(FunctionObject func |
@@ -110,7 +110,7 @@ predicate too_many_args(Call call, Object callable, int limit) {
110110
predicate wrong_args(Call call, FunctionObject func, int limit, string too) {
111111
too_few_args_objectapi(call, func, limit) and too = "too few"
112112
or
113-
too_many_args(call, func, limit) and too = "too many"
113+
too_many_args_objectapi(call, func, limit) and too = "too many"
114114
}
115115

116116
/** Holds if `call` has correct number of arguments for `func`.

python/ql/src/Expressions/WrongNumberArgumentsInCall.ql

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ import CallArgs
1717
from Call call, FunctionObject func, string too, string should, int limit
1818
where
1919
(
20-
too_many_args(call, func, limit) and too = "too many arguments" and should = "no more than "
20+
too_many_args_objectapi(call, func, limit) and too = "too many arguments" and should = "no more than "
2121
or
2222
too_few_args_objectapi(call, func, limit) and too = "too few arguments" and should = "no fewer than "
2323
) and

0 commit comments

Comments
 (0)