Is there a way via the plugin api to request targe...
# plugins
p
Is there a way via the plugin api to request target generators? specifically, I am trying to get the defined
PythonRequirementsTargetGenerator
(
python_requirements
) so I can get the python requirement files used in the repo:
python_requirements.source
?
b
Is this for
pip-audit
? 😁
h
what do you mean? You want the
Target
instance, so that you can do
my_tgt[SourceField]
? Target generators are like any other target, so you can use
Get(WrappedTarget, WrappedTargetRequest(Address(..), description_of_origin="..."))
if you know the address already. If you don't know the address, look over
AllUnexpandedTargets
, or use
Get(UnexpandedTargets, RawSpecs())
if you know what folder to look in (Unexpanded means "don't replace target generators w/ their generated targets")
👍 1
p
that worked. thanks.