Skip to content

Commit 86bb884

Browse files
committed
Python: better comment
1 parent 7324177 commit 86bb884

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

python/ql/lib/semmle/python/dataflow/new/internal/VariableCapture.qll

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -34,9 +34,11 @@ private module CaptureInput implements Shared::InputSig<Location> {
3434
class BasicBlock extends PY::BasicBlock {
3535
Callable getEnclosingCallable() { result = this.getScope() }
3636

37-
// Note `PY:BasicBlock` does not have a `GetLocation` and
38-
// has a more complicated location info logic.
39-
// This is good enough for here.
37+
// Note `PY:BasicBlock` does not have a `getLocation`.
38+
// (Instead it has a complicated location info logic.)
39+
// Using the location of the first node is simple
40+
// and we just need a way to identify the basic block
41+
// during debugging, so this will be serviceable.
4042
Location getLocation() { result = super.getNode(0).getLocation() }
4143
}
4244

0 commit comments

Comments
 (0)