fresh-cat-90827
03/17/2023, 8:23 PMTarget
e.g.
files = await Get(SourceFiles, Target, target)
TypeError: Invalid Get. The third argument ... must have the exact same type as the second argument, <class 'pants.engine.target.Target'>, but had the type <class 'pants.backend.python.target_types.PythonTestTarget'>.
the code I have works in the goal rule, I just wanted to tidy up and extract into a separate rule. I know vaguely about the UnionRule, but I am not sure it can help me as I don't want to create new classes and register with @union
, I want to union existing classes which are not decorated with @union
and seems to be unusable. Does that make any sense?curved-television-6568
03/17/2023, 8:27 PMtarget
vary, or is it always going to be a PythonTestTarget
?fresh-cat-90827
03/17/2023, 8:27 PMfresh-cat-90827
03/17/2023, 8:29 PMtarget = await Get(Target, Address, address)
in the rule 😕curved-television-6568
03/17/2023, 8:32 PMfresh-cat-90827
03/17/2023, 8:32 PMawait Get(Targets, Addresses([address]))
works 🙂fresh-cat-90827
03/17/2023, 8:32 PM