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

Module Attributes

This module provides an API for attribute reads and writes.

Import path

import semmle.python.dataflow.new.internal.Attributes

Imports

DataFlowPublic

Provides Python-specific definitions for use in the data flow library.

DataFlowUtil

Contains utility functions for writing data flow queries

Classes

AttrRead

A read of an attribute on an object. This includes - Simple attribute reads: object.attr - Dynamic attribute reads using getattr: getattr(object, attr) - Qualified imports: from module import attr as name

AttrRef

A data flow node that reads or writes an attribute of an object.

AttrWrite

A data flow node that writes an attribute of an object. This includes - Simple attribute writes: object.attr = value - Dynamic attribute writes: setattr(object, attr, value) - Fields written during class initialization: class MyClass: attr = value