mirror of
https://github.com/github/codeql.git
synced 2026-05-03 12:45:27 +02:00
Python: Address review comments.
This commit is contained in:
@@ -90,10 +90,16 @@ class AugAssign extends AugAssign_ {
|
||||
/* syntax: Expr += Expr */
|
||||
override Expr getASubExpression() { result = this.getOperation() }
|
||||
|
||||
/** Gets the target of this augmented assignment statement. */
|
||||
/**
|
||||
* Gets the target of this augmented assignment statement.
|
||||
* That is, the `a` in `a += b`.
|
||||
*/
|
||||
Expr getTarget() { result = this.getOperation().(BinaryExpr).getLeft() }
|
||||
|
||||
/** Gets the value of this augmented assignment statement. */
|
||||
/**
|
||||
* Gets the value of this augmented assignment statement.
|
||||
* That is, the `b` in `a += b`.
|
||||
*/
|
||||
Expr getValue() { result = this.getOperation().(BinaryExpr).getRight() }
|
||||
|
||||
override Stmt getASubStatement() { none() }
|
||||
@@ -426,6 +432,6 @@ class StmtList extends StmtList_ {
|
||||
exists(Stmt item | item = this.getAnItem() | item = a or item.contains(a))
|
||||
}
|
||||
|
||||
/** Gets the last item in this list of statements. */
|
||||
/** Gets the last item in this list of statements, if any. */
|
||||
Stmt getLastItem() { result = this.getItem(max(int i | exists(this.getItem(i)))) }
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user