#18388 import inference settings as target or directory-recursive config
Issue created by
jmhodges-color
Is your feature request related to a problem? Please describe.
We've added some code refactoring tooling using
libcst to our monorepo. That means we're writing Python code that modifies other Python code. That code can happen to reference certain imports as strings but don't actually depend on the modules referenced and shouldn't depend on them.
We'd like to turn off the dependency inference from strings of these files and be much stricter about how dependencies are added in order to speed up build and run times for that part of the codebase. But the rest of our codebase very much depends on dependency inference to work well.
Describe the solution you'd like
The ability to change how dependency inference happens at a
python_source
(and related) level. Specifically, being able to turn off the inference of dependencies on modules from strings.
Describe alternatives you've considered
Being very careful about adding
overrides
. But that requires manual inspection via
pants peek
or similar to even detect with the
global setting on.
pantsbuild/pants