CodeQL library for Python
codeql/python-all 0.6.4 (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).

is_callable

Holds if c is a call to callable(obj).

isinstance

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

issubclass

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