python_bazel_template icon indicating copy to clipboard operation
python_bazel_template copied to clipboard

DNL: python: enable gazelle support

Open jessecureton opened this issue 1 year ago • 0 comments

This is a draft PR that enables gazelle support in the repo for python files, but unfortunately I ran into lots of problems around:

  1. Gazelle falling back to file generation mode if there is a if __name__ == "__main__" in a file not named __main__.py
  2. Gazelle assigning incorrect target names in deps lists if a # gazelle:python_*_naming_convention directive is set
  3. 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

jessecureton avatar Mar 17 '24 14:03 jessecureton