Apply suggestions from code review

Co-authored-by: Rasmus Wriedt Larsen <rasmuswriedtlarsen@gmail.com>
This commit is contained in:
yoff
2022-09-28 11:33:00 +02:00
committed by GitHub
parent 441fc1bb28
commit 70d47f313e
2 changed files with 3 additions and 3 deletions

View File

@@ -245,6 +245,7 @@ module API {
/**
* Gets a node representing a subscript of this node.
* For example `obj[x]` is a subscript of `obj`.
*/
Node getASubscript() { result = this.getASuccessor(Label::subscript()) }
@@ -575,7 +576,6 @@ module API {
* API graph node for the prefix `foo`), in accordance with the usual semantics of Python.
*/
// private import semmle.python.internal.Awaited
cached
newtype TApiNode =
/** The root of the API graph. */
@@ -1067,7 +1067,7 @@ module API {
override string toString() { result = "getAwaited()" }
}
/** A label that gets the subscript of a sequence. */
/** A label that gets the subscript of a sequence/mapping. */
class LabelSubscript extends ApiLabel, MkLabelSubscript {
override string toString() { result = "getSubscript()" }
}

View File

@@ -249,7 +249,7 @@ private module Cached {
}
/**
* Holds if `node` flows to a sequence of which `subscript` is a subscript.
* Holds if `node` flows to a sequence/mapping of which `subscript` is a subscript.
*/
cached
predicate subscript(LocalSourceNode node, CfgNode subscript) {