brave-ice-61337
07/17/2023, 2:38 PMIf you do not expect an import to be inferrable, add `# pants: no-infer-dep` to the import line. Otherwise, see <https://www.pantsbuild.org/v2.16/docs/troubleshooting#import-errors-and-missing-dependencies> for common problems.
* tests.python.config_mock (line: 10)
I have a BUILD file in the tests/python folder with the following:
python_sources(
name = "config-mock.lib",
sources = ['config_mock.py'],
)
And referred it into the tests' subfolder BUILD file dependency with
"tests/python:config-mock.lib"
All works fine but i get that warning and i don't know how to handle it.curved-television-6568
07/17/2023, 2:44 PMbrave-ice-61337
07/17/2023, 2:44 PMbrave-ice-61337
07/17/2023, 2:45 PMcurved-television-6568
07/17/2023, 2:46 PMconfig_mock.py
file in some way? can you share one such import line..brave-ice-61337
07/17/2023, 2:47 PMfrom tests.python import config_mock
curved-television-6568
07/17/2023, 2:47 PMpants roots
?brave-ice-61337
07/17/2023, 2:47 PM3rdparty/python
pants-plugins/src
src/python
tests/python
curved-television-6568
07/17/2023, 2:48 PMimport config_mock
as the prefix you have is not part of the import path, it’s being stripped as outside a source rootbrave-ice-61337
07/17/2023, 2:49 PMcurved-television-6568
07/17/2023, 2:49 PMcurved-television-6568
07/17/2023, 2:50 PMbrave-ice-61337
07/17/2023, 2:51 PMbrave-ice-61337
07/17/2023, 2:51 PMcurved-television-6568
07/17/2023, 2:55 PMbrave-ice-61337
07/17/2023, 3:35 PM