are the default source patterns extensible globall...
# general
a
are the default source patterns extensible globally? I want to make
factories.py
globally a
python_test_util
and not a
python_source
maybe something like
Copy code
[default-sources]
python_sources += ['!factories.py']
python_test_utils += ['factories.py']
and if not, is this easily done via a plugin?
w
the downside is that rather than
python_test_util
you’d need to use the macro, since we don’t support shadowing existing symbols (afaik)
a
yeah, considered that, and will probably go that way but... • I've already once gone and retrospectively macroed a load of things, and that was !fun. • You can't access the defaults in a macro • my macros are already a mess. • I kinda don't like writing macros because they're unlintable, and the limitations on what you can/can't do in them is 😬
macros very quickly became "oh I'll just do that in a macro" to "oh why did I do that in a macro"
w
yea, all very good points.
this probably relates to https://github.com/pantsbuild/pants/issues/13767 then. Although in many cases we do have capital-O Options for things like this, the ability to adjust defaults in a minimally boilerplatey but still obvious way is an open question