rules_py icon indicating copy to clipboard operation
rules_py copied to clipboard

docs: correct broken anchor link in py_test docstring for Bazel registry docs

Open georgesfarah opened this issue 4 months ago • 0 comments

Summary

The Bazel registry (registry.bazel.build) renders function/macro definition anchors with a function- prefix (e.g. id="function-py_binary"), but the py_test docstring linked to ./py_binary.md (a relative file path), which resolves to a 404 on the registry.

  • ./py_binary.md -> #function-py_binary in py_test macro docstring

Note: The same broken anchor pattern also exists for py_venv_exec and py_venv_exec_test in py/private/py_venv/py_venv_exec.bzl (#py_binary and #py_test), but those are not currently rendered on the registry docs page so they are not fixed here.

Test plan

Manual testing:

  1. Visit https://registry.bazel.build/docs/aspect_rules_py
  2. In the py_test macro description, click the "py_binary" link — currently leads to a broken ./py_binary.md path (404)
  3. After this fix, the link navigates to the py_binary macro section on the same page

georgesfarah avatar Jul 12 '26 01:07 georgesfarah