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

Predicate hasattr

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

Import path

import semmle.python.pointsto.Filters
predicate hasattr(CallNode c, ControlFlowNode obj, string attr)