Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions sphinxdocs/src/sphinx_bzl/bzl.py
Original file line number Diff line number Diff line change
Expand Up @@ -1766,6 +1766,11 @@ def _on_missing_reference(app, env: environment.BuildEnvironment, node, contnode
# There's no Bazel docs for None, so prevent missing xrefs warning
if node["reftarget"] == "None":
return contnode

# Any and object are just conventions from Python, but useful for
# indicating what something is in Starlark, so treat them specially.
if node["reftarget"] in ("Any", "object"):
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

node["reftarget"].lower() in ("any", "object"):? I'm not sure if any is different from Any.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In python land, it's case sensitive. This is all informal, so we can kind of make it up. And for doc purposes, either might be convenient. For now, I'm just gonna match Python.

return contnode
return None


Expand Down