Skip to main content

ConfiguredAttr

Methods on configured target node's attributes.

ConfiguredAttr.type

ConfiguredAttr.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)

ConfiguredAttr.value

def ConfiguredAttr.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())