@@ -45,7 +45,6 @@ Function getDirectSuperCallTargetFromCall(
45
45
Class mroBase , Function meth , DataFlow:: MethodCallNode call , string name
46
46
) {
47
47
meth = call .getScope ( ) and
48
- getADirectSuperclass * ( mroBase ) = meth .getScope ( ) and
49
48
meth .getName ( ) = name and
50
49
call .calls ( _, name ) and
51
50
mroBase = getADirectSubclass * ( meth .getScope ( ) ) and
@@ -56,7 +55,7 @@ Function getDirectSuperCallTargetFromCall(
56
55
result = findFunctionAccordingToMroKnownStartingClass ( targetCls , mroBase , name )
57
56
or
58
57
// targetCls is the mro base for this lookup.
59
- // note however that if the call we find uses super(), that still uses the mro of the instance `self` will sill be used
58
+ // note however that if the call we find uses super(), that still uses the mro of the instance `self`
60
59
// assuming it's 0-arg or is 2-arg with `self` as second arg.
61
60
callsMethodOnClassWithSelf ( meth , call , targetCls , _) and
62
61
result = findFunctionAccordingToMroKnownStartingClass ( targetCls , targetCls , name )
@@ -96,7 +95,7 @@ predicate superCall(DataFlow::MethodCallNode call, string name) {
96
95
)
97
96
}
98
97
99
- /** Holds if `meth` calls `super().<name>` where `name` is the name of the method . */
98
+ /** Holds if `meth` calls a `super()` method of the same name . */
100
99
predicate callsSuper ( Function meth ) {
101
100
exists ( DataFlow:: MethodCallNode call |
102
101
call .getScope ( ) = meth and
@@ -122,7 +121,7 @@ predicate callsMethodOnUnknownClassWithSelf(Function meth, string name) {
122
121
call .calls ( callTarget , name ) and
123
122
self .getParameter ( ) = meth .getArg ( 0 ) and
124
123
self .( DataFlow:: LocalSourceNode ) .flowsTo ( call .getArg ( 0 ) ) and
125
- not exists ( Class target | callTarget = classTracker ( target ) )
124
+ not callTarget = classTracker ( any ( Class target ) )
126
125
)
127
126
}
128
127
0 commit comments