Skip to main content

configured_attr type

Methods on configured target node's attributes.

configured_attr.type

configured_attr.type: str

Returns the type name of the attribute

Sample usage:

def _impl_type(ctx):
node = ctx.cquery().owner("bin/TARGETS")[0]
attrs = node.attrs_eager()
ctx.output.print(attrs.name.type)

configured_attr.value

def configured_attr.value()

Returns the value of this attribute. The value here is not fully resolved like in rules.

Sample usage:

def _impl_value(ctx):
node = ctx.cquery().owner("bin/TARGETS")[0]
attrs = node.attrs_eager()
ctx.output.print(attrs.name.value())