PrettyAttr#

class brainstate.util.PrettyAttr(key, value, start='', end='', comment=None)[source]#

Configuration for pretty representation of attributes.

key#

The attribute name or key. An empty key renders the value as a positional item (without key<value_sep>).

Type:

str

value#

The attribute value. A str value is inserted verbatim; any other value is rendered recursively.

Type:

Union[str, Any]

start#

Optional prefix for the attribute.

Type:

str, default=’’

end#

Optional suffix for the attribute.

Type:

str, default=’’

comment#

Optional trailing # comment, shown only when the enclosing group is broken over several lines.

Type:

str or None, default=None