treescope.dataclass_util

treescope.dataclass_util#

Utilities for working with dataclasses.

Functions

dataclass_from_attributes(cls, **field_values)

Directly instantiates a dataclass given all of its fields.

init_takes_fields(cls)

Returns True if cls.__init__ takes exactly one argument per field.