Files
codeql/python/ql/test/library-tests/ApiGraphs/py3/getSubscript.ql
Rasmus Lerchedahl Petersen 0b8e908823 Python: fix def nodes for subscript
We were using `getMember` for dictionaries, these are now getIndex
Also add convenience predicate for string keys
2022-10-12 20:13:48 +02:00

5 lines
145 B
Plaintext

import python
import semmle.python.ApiGraphs
select API::moduleImport("mypkg").getMember("foo").getReturn().getSubscript(["bar", "baz", "qux"])