We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 9119852 commit d804acdCopy full SHA for d804acd
python/ql/src/Expressions/CallToSuperWrongClass.ql
@@ -17,10 +17,10 @@ import semmle.python.dataflow.new.DataFlow
17
18
from DataFlow::CallCfgNode call_to_super, string name
19
where
20
- call_to_super.getFunction().getALocalSource().asExpr().(Name).getId() = "super" and
+ call_to_super = API::builtin("super").getACall() and
21
name = call_to_super.getScope().getScope().(Class).getName() and
22
exists(DataFlow::Node arg |
23
arg = call_to_super.getArg(0) and
24
- not arg.getALocalSource().asExpr().(Name).getId() = name
+ arg.getALocalSource().asExpr().(Name).getId() != name
25
)
26
select call_to_super.getNode(), "First argument to super() should be " + name + "."
0 commit comments