Hi everyone, I'm using pants and having trouble w...
# general
f
Hi everyone, I'm using pants and having trouble with unexpected lint warning. My BUILD file looks like this:
Copy code
python_tests(
    dependencies=["abc/src:sources", ":requirements"],
    sources=["**/*_test.py"],
)

python_requirement(name="requirements", requirements=["pytest==7.0.1"])
I'm running:
pants dependencies abc/tests/abc_test.py
and get output:
abc/tests:requirements
and I'm still see this warning after running `pants lint`:
Copy code
11:42:53.52 [WARN] Pants cannot infer owners for the following imports in the target abc/tests/abc_test.py:

  * pytest (line: 3)

If 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.19/docs/troubleshooting#import-errors-and-missing-dependencies> for common problems.
Can anyone assist?
c
that's weird, it worked for me when I tried it on a fresh repo. I wonder if it's cached? you can bypassing the cache with the
--no-pantsd
or
--no-local-cache
options.