Skip to content

Commit 061bbb8

Browse files
committed
Python: Restructure getNamedArgumentForCall
So it matches the structure of getArgumentForCall -- call.getArgByName first!
1 parent 838106d commit 061bbb8

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

python/ql/src/semmle/python/objects/ObjectAPI.qll

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -380,14 +380,14 @@ class CallableValue extends Value {
380380
PointsToInternal::pointsTo(call.getFunction(), _, called, _) and
381381
called.functionAndOffset(this, offset)
382382
|
383+
call.getArgByName(name) = result and
384+
exists(this.getParameterByName(name))
385+
or
383386
exists(int n |
384387
call.getArg(n) = result and
385388
this.getParameter(n+offset).getId() = name
386389
)
387390
or
388-
call.getArgByName(name) = result and
389-
exists(this.getParameterByName(name))
390-
or
391391
called instanceof BoundMethodObjectInternal and
392392
offset = 1 and
393393
name = "self" and

0 commit comments

Comments
 (0)