python_bazel_template
python_bazel_template copied to clipboard
DNL: python: enable gazelle support
This is a draft PR that enables gazelle support in the repo for python files, but unfortunately I ran into lots of problems around:
- Gazelle falling back to
filegeneration mode if there is aif __name__ == "__main__"in a file not named__main__.py - Gazelle assigning incorrect target names in deps lists if a
# gazelle:python_*_naming_conventiondirective is set - Behavior I couldn't quite figure out around test target locations and expectations for a test entrypoint named
__test__.py
All in all this seems nice to have, but enforces too many constraints around python development that don't fit in with the way I want python dev to work in this template. I'm uploading this in case anyone wants to pick it up and run with it or in case I want to follow up on it later, but in the meantime gazelle+python is dead in the water for this project