@@ -142,15 +142,13 @@ API::Node getExtraSuccessorFromNode(API::Node node, AccessPathTokenBase token) {
142142 // `DataFlow::DictionaryElementContent` just from seeing a subscript read, so we would
143143 // need to add that. (also need to handle things like `DictionaryElementAny` which
144144 // doesn't have any value for .getAnArgument())
145- (
146- token .getName ( ) = "DictionaryElement" and
147- result = node .getSubscript ( token .getAnArgument ( ) )
148- or
149- token .getName ( ) = "DictionaryElementAny" and
150- result = node .getASubscript ( ) and
151- not exists ( token .getAnArgument ( ) )
152- // TODO: ListElement/SetElement/TupleElement
153- )
145+ token .getName ( ) = "DictionaryElement" and
146+ result = node .getSubscript ( token .getAnArgument ( ) )
147+ or
148+ token .getName ( ) in [ "DictionaryElementAny" , "ListElement" ] and
149+ result = node .getASubscript ( ) and
150+ not exists ( token .getAnArgument ( ) )
151+ // TODO: SetElement/TupleElement
154152 // Some features don't have MaD tokens yet, they would need to be added to API-graphs first.
155153 // - decorators ("DecoratedClass", "DecoratedMember", "DecoratedParameter")
156154}
@@ -261,7 +259,7 @@ predicate isExtraValidTokenNameInIdentifyingAccessPath(string name) {
261259 name =
262260 [
263261 "Member" , "Instance" , "Awaited" , "Call" , "Method" , "Subclass" , "DictionaryElement" ,
264- "DictionaryElementAny"
262+ "DictionaryElementAny" , "ListElement"
265263 ]
266264}
267265
@@ -270,7 +268,7 @@ predicate isExtraValidTokenNameInIdentifyingAccessPath(string name) {
270268 * in an identifying access path.
271269 */
272270predicate isExtraValidNoArgumentTokenInIdentifyingAccessPath ( string name ) {
273- name = [ "Instance" , "Awaited" , "Call" , "Subclass" , "DictionaryElementAny" ]
271+ name = [ "Instance" , "Awaited" , "Call" , "Subclass" , "DictionaryElementAny" , "ListElement" ]
274272}
275273
276274/**
0 commit comments