Have python_binary_naming_convention
directive also apply to if __name__ == "__main__":
files
#1815
Labels
gazelle
Gazelle plugin related issues
馃殌 feature request
Relevant Rules
Description
The
python_binary_naming_convention
directive currently only applies to binaries that are generated from__main__.py
files.py_binary
targets that are generated from files that containif __name__ == "__main__":
are named after their source file. From the README (emphasis mine):This results in name collisions when a single file is both a binary and a library and gazelle will report:
The readme also says:
However, for existing projects that might not be feasible.
Describe the solution you'd like
Have
python_binary_naming_convention
directive also apply to files that containif __name__ ...
.Or add another directive that accomplishes such.
Describe alternatives you've considered
Right now I'm just manually making all ~450 or so
py_binary
targets that our monorepo has 馃槶The text was updated successfully, but these errors were encountered: