Skip to content

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 dougthor42 and groodt 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