lazy_resolved_attrs
type
The context for getting resolved attrs lazily on a target_node
.
lazy_resolved_attrs.get
def lazy_resolved_attrs.get(attr: str)
Gets a single resolved attribute. Returns an optional configured attribute.
Gets a single attribute.
def _impl_resolved_attrs_lazy(ctx): node = ctx.cquery().owner("cell//path/to/TARGETS")[0] attrs = node.resolved_attrs_lazy(ctx) # cache once ctx.output.print(attrs.get("some_attribute").value()) ctx.output.print(attrs.get("some_attribute").label)