Description
🚀 feature request
Relevant Rules
gazelle
Description
Gazelle will automatically add a dep on :conftest
to py_test targets if the directory has a conftest.py
file.
rules_python/gazelle/python/generate.go
Lines 126 to 127 in 5c68ff9
rules_python/gazelle/python/generate.go
Lines 364 to 394 in 5c68ff9
rules_python/gazelle/python/generate.go
Lines 468 to 470 in 5c68ff9
If the file doesn't need conftest.py
, this can result in pulling in a large dep tree unnecessarily.
Describe the solution you'd like
Python annotation # gazelle:include_conftest false
.
- When
false
, force-exclude add the dep. - When
true
, force-add the dep. This is equivalent to the# gazelle:include_dep :conftest
directive. - Defaults to unset, which is the same as the current behavior
Describe alternatives you've considered
None.