Skip to content

Commit 9847c83

Browse files
committed
Python: Port SuperInOldStyleClass.ql
1 parent 890ce56 commit 9847c83

File tree

1 file changed

+4
-5
lines changed

1 file changed

+4
-5
lines changed

python/ql/src/Classes/SuperInOldStyleClass.ql

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -11,14 +11,13 @@
1111
*/
1212

1313
import python
14-
private import LegacyPointsTo
14+
private import semmle.python.dataflow.new.internal.DataFlowDispatch
1515

1616
predicate uses_of_super_in_old_style_class(Call s) {
17-
exists(Function f, ClassObject c |
17+
exists(Function f, Class c |
1818
s.getScope() = f and
19-
f.getScope() = c.getPyClass() and
20-
not c.failedInference() and
21-
not c.isNewStyle() and
19+
f.getScope() = c and
20+
not DuckTyping::isNewStyle(c) and
2221
s.getFunc().(Name).getId() = "super"
2322
)
2423
}

0 commit comments

Comments
 (0)