Skip to main content

configured_target_label type

configured_target_label.cell

configured_target_label.cell: str

configured_target_label.config

def configured_target_label.config() -> configuration

configured_target_label.name

configured_target_label.name: str

configured_target_label.package

configured_target_label.package: str

configured_target_label.path

configured_target_label.path: CellPath

configured_target_label.raw_target

def configured_target_label.raw_target() -> target_label

Returns the unconfigured underlying target label.


configured_target_label.with_sub_target

def configured_target_label.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"]))