CodeQL library for Python
codeql/python-all 2.1.1-dev (changelog, source)
Search

Member predicate ClassValue::isMapping

Holds if this class is a mapping. Mutually exclusive with isSequence().

Although a class will satisfy the requirement by the definition in https://docs.python.org/3.8/glossary.html#term-mapping, we don’t look at the keys accepted by `getitem, but default to treating a class as a sequence (so might treat some mappings as sequences).

predicate isMapping()