mirror of
https://github.com/github/codeql.git
synced 2025-12-20 10:46:30 +01:00
Adds preliminary modernization
This commit is contained in:
@@ -17,13 +17,13 @@ import python
|
||||
from CallNode call_to_super, string name
|
||||
where
|
||||
exists(GlobalVariable gv, ControlFlowNode cn |
|
||||
call_to_super = theSuperType().getACall() and
|
||||
call_to_super = ClassValue::super_().getACall() and
|
||||
gv.getId() = "super" and
|
||||
cn = call_to_super.getArg(0) and
|
||||
name = call_to_super.getScope().getScope().(Class).getName() and
|
||||
exists(ClassObject other |
|
||||
cn.refersTo(other) and
|
||||
not other.getPyClass().getName() = name
|
||||
exists(ClassValue other |
|
||||
cn.pointsTo(other) and
|
||||
not other.getScope().getName() = name
|
||||
)
|
||||
)
|
||||
select call_to_super.getNode(), "First argument to super() should be " + name + "."
|
||||
|
||||
Reference in New Issue
Block a user