Python: Highlight we actually want post-update nodes for *args and **kwargs arguments

This commit is contained in:
Rasmus Wriedt Larsen
2023-11-28 14:07:03 +01:00
parent 02f2031239
commit 2c10160ad4

View File

@@ -15,8 +15,10 @@ private module Input implements InputSig<PythonDataFlow> {
private import Public private import Public
predicate argHasPostUpdateExclude(ArgumentNode n) { predicate argHasPostUpdateExclude(ArgumentNode n) {
// TODO: Implement post-updates for *args, see tests added in https://github.com/github/codeql/pull/14936
exists(ArgumentPosition apos | n.argumentOf(_, apos) and apos.isStarArgs(_)) exists(ArgumentPosition apos | n.argumentOf(_, apos) and apos.isStarArgs(_))
or or
// TODO: Implement post-updates for **kwargs, see tests added in https://github.com/github/codeql/pull/14936
exists(ArgumentPosition apos | n.argumentOf(_, apos) and apos.isDictSplat()) exists(ArgumentPosition apos | n.argumentOf(_, apos) and apos.isDictSplat())
} }