class documentation

class PyObject(ObjectDescription[Tuple[str, str]]):

Known subclasses: sphinx.domains.python.PyAttribute, sphinx.domains.python.PyClasslike, sphinx.domains.python.PyFunction, sphinx.domains.python.PyMethod, sphinx.domains.python.PyProperty, sphinx.domains.python.PyVariable

View In Hierarchy

Description of a general Python object.
Unknown Field: vartype
allow​_nestingbool
Method add​_target​_and​_index Undocumented
Method after​_content Handle object de-nesting after content
Method before​_content Handle object nesting before content
Method get​_index​_text Return the text for the index entry of the object.
Method get​_signature​_prefix May return a prefix to put before the object name in the signature.
Method handle​_signature Transform a Python signature into RST nodes.
Method needs​_arglist May return true if an empty argument list is to be generated even if the document contains none.
Class Variable allow​_nesting Class is an object that allows for nested namespaces
Class Variable doc​_field​_types Undocumented
Class Variable option​_spec Undocumented
def add_target_and_index(self, name_cls, sig, signode):

Undocumented

Parameters
name​_cls:Tuple[str, str]Undocumented
sig:strUndocumented
signode:desc_signatureUndocumented
def after_content(self):

Handle object de-nesting after content

If this class is a nestable object, removing the last nested class prefix ends further nesting in the object.

If this class is not a nestable object, the list of classes should not be altered as we didn't affect the nesting levels in before_content.

def before_content(self):

Handle object nesting before content

PyObject represents Python language constructs. For constructs that are nestable, such as a Python classes, this method will build up a stack of the nesting hierarchy so that it can be later de-nested correctly, in after_content.

For constructs that aren't nestable, the stack is bypassed, and instead only the most recent object is tracked. This object prefix name will be removed with after_content.

def get_index_text(self, modname, name):
Return the text for the index entry of the object.
Parameters
modname:strUndocumented
name:Tuple[str, str]Undocumented
Returns
strUndocumented
def get_signature_prefix(self, sig):
May return a prefix to put before the object name in the signature.
Parameters
sig:strUndocumented
Returns
List[nodes.Node]Undocumented
def handle_signature(self, sig, signode):

Transform a Python signature into RST nodes.

Return (fully qualified name of the thing, classname if any).

If inside a class, the current class name is handled intelligently: * it is stripped from the displayed name if present * it is added to the full name (return value) if not present

Parameters
sig:strUndocumented
signode:desc_signatureUndocumented
Returns
Tuple[str, str]Undocumented
def needs_arglist(self):
May return true if an empty argument list is to be generated even if the document contains none.
Returns
boolUndocumented
allow_nesting: bool =
Class is an object that allows for nested namespaces
doc_field_types =

Undocumented