Skip to content

Commit 1fde477

Browse files
committed
Python: Refactor argument matching
1 parent b0cfa1d commit 1fde477

File tree

1 file changed

+1
-5
lines changed
  • python/ql/src/experimental/semmle/python/frameworks

1 file changed

+1
-5
lines changed

python/ql/src/experimental/semmle/python/frameworks/Stdlib.qll

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -420,11 +420,7 @@ private module Stdlib {
420420
exists(CallNode call |
421421
nodeTo.asCfgNode() = call and
422422
call.getFunction() = builtins_attr("compile").asCfgNode() and
423-
(
424-
call.getArg(0) = nodeFrom.asCfgNode()
425-
or
426-
call.getArgByName("source") = nodeFrom.asCfgNode()
427-
)
423+
nodeFrom.asCfgNode() in [call.getArg(0), call.getArgByName("source")]
428424
)
429425
}
430426
}

0 commit comments

Comments
 (0)