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

Module Filters

Helper predicates for standard tests in Python commonly used to filter objects by value or by type.

Import path

import semmle.python.pointsto.Filters

Imports

Predicates

equality_test

Holds if c is a test comparing x and y. is is true if the operator is is or ==, it is false if the operator is is not or !=.

hasattr

Holds if c is a call to hasattr(obj, attr).

isinstance

Holds if c is a call to isinstance(use, cls).