Thanks to visit codestin.com
Credit goes to github.com

Skip to content

sphinxdocs: make Any and object types no-ops to avoid missing xrefs #2905

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged

Conversation

rickeylev
Copy link
Collaborator

The "Any" and "object" types are useful in expression starlark types, but aren't actually
real things. Treat them like None and make them no-ops so they aren't treated like
missing xrefs.

@rickeylev rickeylev requested review from groodt and dougthor42 May 18, 2025 02:55
@rickeylev rickeylev requested a review from aignas as a code owner May 18, 2025 02:55
@rickeylev rickeylev enabled auto-merge May 18, 2025 02:56

# 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.

@rickeylev rickeylev added this pull request to the merge queue May 18, 2025
Merged via the queue into bazel-contrib:main with commit ec0dcd2 May 18, 2025
2 of 3 checks passed
@rickeylev rickeylev deleted the sphinxdocs.special.case.any.object branch May 18, 2025 04:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants