Skip to main content

Module objects

Module objects 

Source
Expand description

The domains’ get_objects() (domains/__init__.py:285): every object a domain exposes to the object inventory (objects.inv) and the search index (searchindex.js), as the (name, dispname, type, docname, anchor, priority) rows Sphinx yields — plus the two per-type lookups both consumers share, the search priority (ObjType.attrs['searchprio']) and the localized type name (Domain.get_type_name).

One producer for both artifacts is the point: the inventory and the search index can only ever disagree about an object if Sphinx’s do.

Functions§

domain_objects
Both domains this build populates, in env.domains.sorted() order, each sorted the way sorted(domain.get_objects()) sorts its tuples.
object_type_name
Domain.get_type_name(otype) (domains/__init__.py:318-322), as IndexBuilder.get_objects calls it: the std domain overrides it to the bare ObjType.lname (domains/std/__init__.py:1359); every other domain prefixes its label, so a Python class is a Python class. A type the domain has no ObjType for is named by its type string, which is what get_objects falls back to.
py_domain_objects
PythonDomain.get_objects() (domains/python/__init__.py:1056-1065): modules come from the module registry at priority 0 and are skipped in the object registry; aliased objects are not full-text searchable.
std_domain_objects
StandardDomain.get_objects() (domains/std/__init__.py:1283-1308).
std_search_priority
ObjType(..., searchprio=...) for the std domain’s types (domains/std/__init__.py:725-734). ObjType defaults searchprio to 1 (domains/__init__.py:53), so every type the table does not mark unsearchable — confval, envvar, cmdoption, and whatever add_object_type registers — is 1.