<#17614 Expose field default values in a BUILD fil...
# github-notifications
q
#17614 Expose field default values in a BUILD file New issue created by thejcannon Is your feature request related to a problem? Please describe. When I want to add a source to a
python_sources
field, I have to repeat the default globs (which includes remembering to omit tests and include
.pyi
files). This is painful and not upgrade-friendly. Additionally, people want to do
python_sources(sources=["**/*.py"])
however, that isn't quite right (again, tests and pyis, and conftests). Describe the solution you'd like A way to refer to the defaults inside my BUILD file so I can mangle it. Strawman:
Copy code
# Using `python_sources.sources.default`
python_sources(
    sources = python_sources.sources.default + ["TotallyAPythonFile"]
)
# or
python_sources(
    sources = [
        "**/" + default for default in
        python_sources.sources.default   
    ]
)
Describe alternatives you've considered Hardcording 🤮 Additional context 🎩 pantsbuild/pants
u