Python: Port SuperInOldStyleClass.ql

This commit is contained in:
Taus
2026-02-20 15:26:27 +00:00
parent 3d20050c0a
commit e860d706c9

View File

@@ -11,14 +11,13 @@
*/
import python
private import LegacyPointsTo
private import semmle.python.dataflow.new.internal.DataFlowDispatch
predicate uses_of_super_in_old_style_class(Call s) {
exists(Function f, ClassObject c |
exists(Function f, Class c |
s.getScope() = f and
f.getScope() = c.getPyClass() and
not c.failedInference() and
not c.isNewStyle() and
f.getScope() = c and
not DuckTyping::isNewStyle(c) and
s.getFunc().(Name).getId() = "super"
)
}