class documentation

class PythonDomain(Domain): (source)

View In Hierarchy

Python language domain.

Method clear_doc Remove traces of a document in the domain-specific inventories.
Method find_obj Find a Python object for "name", perhaps using the given module and/or classname. Returns a list of (name, object entry) tuples.
Method get_full_qualified_name Return full qualified name for given node.
Method get_objects Return an iterable of "object descriptions".
Method merge_domaindata Merge in data regarding *docnames* from a different domaindata inventory (coming from a subprocess in parallel builds).
Method note_module Note a python module for cross reference.
Method note_object Note a python object for cross reference.
Method resolve_any_xref Resolve the pending_xref *node* with the given *target*.
Method resolve_xref Resolve the pending_xref *node* with the given *typ* and *target*.
Class Variable directives Undocumented
Class Variable indices Undocumented
Class Variable initial_data Undocumented
Class Variable label Undocumented
Class Variable name Undocumented
Class Variable object_types Undocumented
Class Variable roles Undocumented
Property modules Undocumented
Property objects Undocumented
Method _make_module_refnode Undocumented

Inherited from Domain:

Method __init__ Undocumented
Method add_object_type Add an object type.
Method check_consistency Do consistency checks (**experimental**).
Method directive Return a directive adapter class that always gives the registered directive its full name ('domain:name') as ``self.name``.
Method get_enumerable_node_type Get type of enumerable nodes (experimental).
Method get_type_name Return full name for given ObjType.
Method process_doc Process a document after it is read by the environment.
Method process_field_xref Process a pending xref created in a doc field. For example, attach information about the current scope.
Method role Return a role adapter function that always gives the registered role its full name ('domain:name') as the first argument.
Method setup Set up domain object.
Class Variable dangling_warnings Undocumented
Class Variable data_version Undocumented
Class Variable enumerable_nodes Undocumented
Instance Variable data Undocumented
Instance Variable env Undocumented
Instance Variable objtypes_for_role Undocumented
Instance Variable role_for_objtype Undocumented
Instance Variable _directive_cache Undocumented
Instance Variable _role2type Undocumented
Instance Variable _role_cache Undocumented
Instance Variable _type2role Undocumented
def clear_doc(self, docname): (source)

Remove traces of a document in the domain-specific inventories.

Parameters
docname:strUndocumented
def find_obj(self, env, modname, classname, name, type, searchmode=0): (source)

Find a Python object for "name", perhaps using the given module and/or classname. Returns a list of (name, object entry) tuples.

Parameters
env:BuildEnvironmentUndocumented
modname:strUndocumented
classname:strUndocumented
name:strUndocumented
type:str|NoneUndocumented
searchmode:intUndocumented
Returns
list[tuple[str, ObjectEntry]]Undocumented
def get_full_qualified_name(self, node): (source)

Return full qualified name for given node.

Parameters
node:ElementUndocumented
Returns
str|NoneUndocumented
def get_objects(self): (source)

Return an iterable of "object descriptions". Object descriptions are tuples with six items: ``name`` Fully qualified name. ``dispname`` Name to display when searching/linking. ``type`` Object type, a key in ``self.object_types``. ``docname`` The document where it is to be found. ``anchor`` The anchor name for the object. ``priority`` How "important" the object is (determines placement in search results). One of: ``1`` Default priority (placed before full-text matches). ``0`` Object is important (placed before default-priority objects). ``2`` Object is unimportant (placed after full-text matches). ``-1`` Object should not show up in search at all.

Returns
Iterator[tuple[str, str, str, str, str, int]]Undocumented
def merge_domaindata(self, docnames, otherdata): (source)

Merge in data regarding *docnames* from a different domaindata inventory (coming from a subprocess in parallel builds).

Parameters
docnames:list[str]Undocumented
otherdata:dict[str, Any]Undocumented
def note_module(self, name, node_id, synopsis, platform, deprecated): (source)

Note a python module for cross reference. .. versionadded:: 2.1

Parameters
name:strUndocumented
node_id:strUndocumented
synopsis:strUndocumented
platform:strUndocumented
deprecated:boolUndocumented
def note_object(self, name, objtype, node_id, aliased=False, location=None): (source)

Note a python object for cross reference. .. versionadded:: 2.1

Parameters
name:strUndocumented
objtype:strUndocumented
node_id:strUndocumented
aliased:boolUndocumented
location:AnyUndocumented
def resolve_any_xref(self, env, fromdocname, builder, target, node, contnode): (source)

Resolve the pending_xref *node* with the given *target*. The reference comes from an "any" or similar role, which means that we don't know the type. Otherwise, the arguments are the same as for :meth:`resolve_xref`. The method must return a list (potentially empty) of tuples ``('domain:role', newnode)``, where ``'domain:role'`` is the name of a role that could have created the same reference, e.g. ``'py:func'``. ``newnode`` is what :meth:`resolve_xref` would return. .. versionadded:: 1.3

Parameters
env:BuildEnvironmentUndocumented
fromdocname:strUndocumented
builder:BuilderUndocumented
target:strUndocumented
node:pending_xrefUndocumented
contnode:ElementUndocumented
Returns
list[tuple[str, Element]]Undocumented
def resolve_xref(self, env, fromdocname, builder, type, target, node, contnode): (source)

Resolve the pending_xref *node* with the given *typ* and *target*. This method should return a new node, to replace the xref node, containing the *contnode* which is the markup content of the cross-reference. If no resolution can be found, None can be returned; the xref node will then given to the :event:`missing-reference` event, and if that yields no resolution, replaced by *contnode*. The method can also raise :exc:`sphinx.environment.NoUri` to suppress the :event:`missing-reference` event being emitted.

Parameters
env:BuildEnvironmentUndocumented
fromdocname:strUndocumented
builder:BuilderUndocumented
type:strUndocumented
target:strUndocumented
node:pending_xrefUndocumented
contnode:ElementUndocumented
Returns
Element|NoneUndocumented
directives = (source)

Undocumented

Undocumented

initial_data: dict[str, dict[str, tuple[Any]]] = (source)

Undocumented

Undocumented

Undocumented

Undocumented

Undocumented

Undocumented

def _make_module_refnode(self, builder, fromdocname, name, contnode): (source)

Undocumented

Parameters
builder:BuilderUndocumented
fromdocname:strUndocumented
name:strUndocumented
contnode:NodeUndocumented
Returns
ElementUndocumented