Hi, I am trying to write a plugin that modifies th...
# general
s
Hi, I am trying to write a plugin that modifies the source files and by doing that skips some dependency inference. I want the ability to tag a python import with
# pants: do-not-include
and if a import is tagged, I want to: 1. Replace import with a lazy import:
import torch
becomes
torch = lazy_import(torch)
2. for that dependency I also want to same functionality as
# pants: do-not-infer
, so the dependency should not be inferred. What is the best approach for doing this?