Skip to content

Commit e117659

Browse files
committed
revert a thing for python
1 parent f4a054e commit e117659

File tree

1 file changed

+8
-4
lines changed

1 file changed

+8
-4
lines changed

python/ql/lib/semmle/python/objects/ObjectAPI.qll

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -343,21 +343,25 @@ module Value {
343343
* Callables include Python functions, built-in functions and bound-methods,
344344
* but not classes.
345345
*/
346-
class CallableValue extends Value instanceof CallableObjectInternal {
346+
class CallableValue extends Value {
347+
CallableValue() { this instanceof CallableObjectInternal }
348+
347349
/**
348350
* Holds if this callable never returns once called.
349351
* For example, `sys.exit`
350352
*/
351-
predicate neverReturns() { super.neverReturns() }
353+
predicate neverReturns() { this.(CallableObjectInternal).neverReturns() }
352354

353355
/** Gets the scope for this function, provided that it is a Python function. */
354356
FunctionScope getScope() { result = this.(PythonFunctionObjectInternal).getScope() }
355357

356358
/** Gets the `n`th parameter node of this callable. */
357-
NameNode getParameter(int n) { result = super.getParameter(n) }
359+
NameNode getParameter(int n) { result = this.(CallableObjectInternal).getParameter(n) }
358360

359361
/** Gets the `name`d parameter node of this callable. */
360-
NameNode getParameterByName(string name) { result = super.getParameterByName(name) }
362+
NameNode getParameterByName(string name) {
363+
result = this.(CallableObjectInternal).getParameterByName(name)
364+
}
361365

362366
/**
363367
* Gets the argument in `call` corresponding to the `n`'th positional parameter of this callable.

0 commit comments

Comments
 (0)