Skip to content

treex.node

Source code in treeo/utils.py
def node(
    default=dataclasses.MISSING,
    *,
    kind: type = type(None),
    default_factory: tp.Optional[tp.Callable[[], tp.Any]] = None,
    init: bool = True,
    repr: bool = True,
    hash: tp.Optional[bool] = None,
    compare: bool = True,
    opaque: tp.Union[bool, OpaquePredicate] = False,
) -> tp.Any:
    return field(
        default=default,
        node=True,
        kind=kind,
        default_factory=default_factory,
        init=init,
        repr=repr,
        hash=hash,
        compare=compare,
        opaque=opaque,
    )