Thanks to visit codestin.com Credit goes to github.com
We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 989d587 commit 2d4f64fCopy full SHA for 2d4f64f
1 file changed
python/ql/src/semmle/python/types/FunctionObject.qll
@@ -47,14 +47,15 @@ abstract class FunctionObject extends Object {
47
48
/** Gets a call-site from where this function is called as a function */
49
CallNode getAFunctionCall() {
50
- result.getFunction() instanceof NameNode and
51
- result = this.getACall()
+ result.getFunction().inferredValue() = theCallable()
52
}
53
54
/** Gets a call-site from where this function is called as a method */
55
CallNode getAMethodCall() {
56
- result.getFunction() instanceof AttrNode and
57
+ exists(BoundMethodObjectInternal bm |
+ result.getFunction().inferredValue() = bm and
+ bm.getFunction() = theCallable()
58
+ )
59
60
61
/** Gets a call-site from where this function is called */
0 commit comments