Skip to content

Commit f3fd91a

Browse files
committed
sphinxdocs: make Any and object types no-ops to avoid missing xrefs
1 parent 2e96b3f commit f3fd91a

File tree

1 file changed

+5
-0
lines changed
  • sphinxdocs/src/sphinx_bzl

1 file changed

+5
-0
lines changed

sphinxdocs/src/sphinx_bzl/bzl.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1766,6 +1766,11 @@ def _on_missing_reference(app, env: environment.BuildEnvironment, node, contnode
17661766
# There's no Bazel docs for None, so prevent missing xrefs warning
17671767
if node["reftarget"] == "None":
17681768
return contnode
1769+
1770+
# Any and object are just conventions from Python, but useful for
1771+
# indicating what something is in Starlark, so treat them specially.
1772+
if node["reftarget"] in ("Any", "object"):
1773+
return contnode
17691774
return None
17701775

17711776

0 commit comments

Comments
 (0)