Skip to content

Commit 87ee6ae

Browse files
committed
Python: Add a bit of docs to CallableObjectInternal
As requested :)
1 parent 9e0d57c commit 87ee6ae

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

python/ql/src/semmle/python/objects/Callables.qll

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,8 +27,10 @@ abstract class CallableObjectInternal extends ObjectInternal {
2727
none()
2828
}
2929

30+
/** Gets the `n`th parameter node of this callable. */
3031
abstract NameNode getParameter(int n);
3132

33+
/** Gets the `name`d parameter node of this callable. */
3234
abstract NameNode getParameterByName(string name);
3335

3436
abstract predicate neverReturns();
@@ -447,6 +449,10 @@ class BoundMethodObjectInternal extends CallableObjectInternal, TBoundMethod {
447449
n >= 0
448450
}
449451

452+
/**
453+
* Gets the `name`d parameter node of this callable.
454+
* Will not return the parameter node for `self`, instead use `getSelfParameter`.
455+
*/
450456
override NameNode getParameterByName(string name) {
451457
result = this.getFunction().getParameterByName(name) and
452458
not result = this.getSelfParameter()

0 commit comments

Comments
 (0)