Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 84875d7

Browse files
committed
Adds preliminary modernization
This will overlapp with/depend on changes to CallArgs and ObjectAPI that are already in the WrongNamedArgumentInCall PR
1 parent 85f5ad2 commit 84875d7

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

python/ql/src/Expressions/WrongNumberArgumentsInCall.ql

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,15 +14,15 @@
1414
import python
1515
import CallArgs
1616

17-
from Call call, FunctionObject func, string too, string should, int limit
17+
from Call call, FunctionValue func, string too, string should, int limit
1818
where
1919
(
20-
too_many_args_objectapi(call, func, limit) and too = "too many arguments" and should = "no more than "
20+
too_many_args(call, func, limit) and too = "too many arguments" and should = "no more than "
2121
or
22-
too_few_args_objectapi(call, func, limit) and too = "too few arguments" and should = "no fewer than "
22+
too_few_args(call, func, limit) and too = "too few arguments" and should = "no fewer than "
2323
) and
2424
not func.isAbstract() and
25-
not exists(FunctionObject overridden | func.overrides(overridden) and correct_args_if_called_as_method_objectapi(call, overridden))
25+
not exists(FunctionValue overridden | func.overrides(overridden) and correct_args_if_called_as_method(call, overridden))
2626
/* The semantics of `__new__` can be a bit subtle, so we simply exclude `__new__` methods */
2727
and not func.getName() = "__new__"
2828

0 commit comments

Comments
 (0)