Apply suggestions from code review

Co-authored-by: Taus <tausbn@github.com>
This commit is contained in:
yoff
2022-11-25 08:50:37 +01:00
committed by GitHub
parent 91198524cd
commit d804acdef7

View File

@@ -17,10 +17,10 @@ import semmle.python.dataflow.new.DataFlow
from DataFlow::CallCfgNode call_to_super, string name
where
call_to_super.getFunction().getALocalSource().asExpr().(Name).getId() = "super" and
call_to_super = API::builtin("super").getACall() and
name = call_to_super.getScope().getScope().(Class).getName() and
exists(DataFlow::Node arg |
arg = call_to_super.getArg(0) and
not arg.getALocalSource().asExpr().(Name).getId() = name
arg.getALocalSource().asExpr().(Name).getId() != name
)
select call_to_super.getNode(), "First argument to super() should be " + name + "."