Does anyone know if there is a way to turn on unma...
# general
l
Does anyone know if there is a way to turn on unmatched_build_file_globs=warn per-target? I want this because I am trying to normalize our use of python_test_utils (to use it in every test directory), but many directories do not (yet) have a file matched by one of the file globs.
b
I don't think so, not today.
h
I think someone may have opened a ticket proposing this
l
w
are you all using
tailor
to create those targets? it should automatically create the
python_test_utils
if you need them
(and not create them if you don’t)
l
yeah we currently have
python_sources
in a bunch of places where it should be
python_test_utils
. I tink most of those were from before
python_test_utils
existed.
so all the files are currently covered by a target, I just watch to switch which target covers them
👍 1
e
I think tailor still creates
python_sources
targets for most of these. It correctly makes a
python_test_utils
for
conftest.py
etc, but most of the files we're talking about here are just regular python modules that happen to live under a
tests
directory (the convention in our codebase) and are only imported from actual tests.
I was hoping that there was something stopping
python_sources
from depending on
python_test_utils
, but I don't actually see that documented on https://www.pantsbuild.org/docs/reference-python_test_utils. They also show as
python_sources
when using
./pants peek
or
--filter-target-type
. It would be nice is there was some way to differentiate these when querying pants.