HasFieldsInClassAttr

HasFieldsInClassAttr#

class penzai.treescope.handlers.hardcoded_structure_handlers.HasFieldsInClassAttr[source]#

Bases: object

Marks a type as having fields listed as a class attribute.

We assume that the constructor for such a type takes each of the fields as keyword arguments, and that the fields are also attributes.

Variables:
  • fields_class_attr (str) – Attribute on the class object that specifies what the fields are, sometimes called “_fields”, “__slots__”

  • render_subclasses (bool) – Whether to also render subclasses of the class.

Methods

__init__(fields_class_attr[, render_subclasses])

Attributes

render_subclasses

fields_class_attr