Skip to content

Commit 7e97bd1

Browse files
committed
Python: Address review comments.
1 parent b469d55 commit 7e97bd1

File tree

1 file changed

+9
-3
lines changed

1 file changed

+9
-3
lines changed

python/ql/src/semmle/python/Stmts.qll

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -90,10 +90,16 @@ class AugAssign extends AugAssign_ {
9090
/* syntax: Expr += Expr */
9191
override Expr getASubExpression() { result = this.getOperation() }
9292

93-
/** Gets the target of this augmented assignment statement. */
93+
/**
94+
* Gets the target of this augmented assignment statement.
95+
* That is, the `a` in `a += b`.
96+
*/
9497
Expr getTarget() { result = this.getOperation().(BinaryExpr).getLeft() }
9598

96-
/** Gets the value of this augmented assignment statement. */
99+
/**
100+
* Gets the value of this augmented assignment statement.
101+
* That is, the `b` in `a += b`.
102+
*/
97103
Expr getValue() { result = this.getOperation().(BinaryExpr).getRight() }
98104

99105
override Stmt getASubStatement() { none() }
@@ -426,6 +432,6 @@ class StmtList extends StmtList_ {
426432
exists(Stmt item | item = this.getAnItem() | item = a or item.contains(a))
427433
}
428434

429-
/** Gets the last item in this list of statements. */
435+
/** Gets the last item in this list of statements, if any. */
430436
Stmt getLastItem() { result = this.getItem(max(int i | exists(this.getItem(i)))) }
431437
}

0 commit comments

Comments
 (0)