ConfiguredTargetLabel
ConfiguredTargetLabel.cell
ConfiguredTargetLabel.cell: str
ConfiguredTargetLabel.config
def ConfiguredTargetLabel.config() -> configuration
ConfiguredTargetLabel.name
ConfiguredTargetLabel.name: str
ConfiguredTargetLabel.package
ConfiguredTargetLabel.package: str
ConfiguredTargetLabel.path
ConfiguredTargetLabel.path: CellPath
ConfiguredTargetLabel.raw_target
def ConfiguredTargetLabel.raw_target(
) -> target_label
Returns the unconfigured underlying target label.
ConfiguredTargetLabel.with_sub_target
def ConfiguredTargetLabel.with_sub_target(
subtarget_name: str | list[str] = ...,
) -> label
Converts a ConfiguredTargetLabel
into its corresponding Label
given the subtarget name which is a list for each layer of subtarget
Sample usage:
def _impl_sub_target(ctx):
owners = ctx.cquery().owner("bin/TARGETS.fixture")
for owner in owners:
configured_label = owner.label
ctx.output.print(configured_label.with_sub_target())
ctx.output.print(configured_label.with_sub_target("subtarget1"))
ctx.output.print(configured_label.with_sub_target(["subtarget1", "subtarget2"]))