Skip to content

treeo.node

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