8000 sphinxdocs: make xrefs to bzl:obj in inventories work (#2894) · kaycebasques/rules_python@d91e9b2 · GitHub
[go: up one dir, main page]

Skip to content

Commit d91e9b2

Browse files
authored
sphinxdocs: make xrefs to bzl:obj in inventories work (bazel-contrib#2894)
Apparently, the `object_type` dict controls what object types are recognized from inventory files. The bazel inventory of terms includes several bzl:obj entries for things that don't have a more appropriate type. This fixes xrefs for terms like RBE, config, and some others.
1 parent 60c1c8e commit d91e9b2

File tree

1 file changed

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

1 file changed

+4
-0
lines changed

sphinxdocs/src/sphinx_bzl/bzl.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1463,6 +1463,8 @@ class _BzlDomain(domains.Domain):
14631463
# :obj:.
14641464
# NOTE: We also use these object types for categorizing things in the
14651465
# generated index page.
1466+
# NOTE: The object type keys control what object types are recognized
1467+
# in inventory files.
14661468
object_types = {
14671469
"arg": domains.ObjType("arg", "arg", "obj"), # macro/function arg
14681470
"aspect": domains.ObjType("aspect", "aspect", "obj"),
@@ -1486,6 +1488,8 @@ class _BzlDomain(domains.Domain):
14861488
# types are objects that have a constructor and methods/attrs
14871489
"type": domains.ObjType("type", "type", "obj"),
14881490
"typedef": domains.ObjType("typedef", "typedef", "type", "obj"),
1491+
# generic objs usually come from inventories
1492+
"obj": domains.ObjType("object", "obj")
14891493
}
14901494

14911495
# This controls:

0 commit comments

Comments
 (0)
0