TargetLabel
TargetLabel.cell
TargetLabel.cell: str
TargetLabel.name
TargetLabel.name: str
TargetLabel.package
TargetLabel.package: str
TargetLabel.path
TargetLabel.path: CellPath
TargetLabel.with_sub_target
def TargetLabel.with_sub_target(
subtarget_name: str | list[str] = ...,
) -> providers_label
Converts a TargetLabel
into its corresponding ProvidersLabel
given the subtarget names, which is a list for each layer of subtarget
Sample usage:
def _impl_sub_target(ctx):
owners = ctx.uquery().owner("bin/TARGETS.fixture")
for owner in owners:
unconfigured_label = owner.label
ctx.output.print(unconfigured_label.with_sub_target())
ctx.output.print(unconfigured_label.with_sub_target("subtarget1"))
ctx.output.print(unconfigured_label.with_sub_target(["subtarget1", "subtarget2"]))