mirror of
https://github.com/github/codeql.git
synced 2026-04-24 16:25:15 +02:00
Python: Ensure other call for super().foo
This commit is contained in:
@@ -111,10 +111,12 @@ private module Input implements InputSig<PythonDataFlow> {
|
||||
or
|
||||
// in the code `def func(self): super().foo(); super.bar()` we use `self` as the
|
||||
// (pos self) argument in both .foo() and .bar() calls.
|
||||
exists(Function f |
|
||||
exists(Function f, DataFlowCall other | other != call |
|
||||
exprNode(f.getArg(0)) = arg and
|
||||
call.getNode().getScope() = f and
|
||||
arg = call.getArgument(any(ArgumentPosition p | p.isSelf()))
|
||||
arg = call.getArgument(any(ArgumentPosition p | p.isSelf())) and
|
||||
arg = other.getArgument(any(ArgumentPosition p | p.isSelf())) and
|
||||
other.getNode().getScope() = f
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user