rules_python
rules_python copied to clipboard
do not index py_binary unless in file mode
This is yet another implementation of #2822. Based on this:
https://github.com/bazel-contrib/rules_python/blob/94e08f7dfe61962fa50508f01ea05c624307d487/gazelle/python/generate.go#L248-L252
The only case when a python file does not exist in py_library is in file mode. Stop indexing py_binary in other mode to avoid ambiguous dependency resolution.