module documentation

Sphinx extension for building opcode documentation.

Class OpcodeError Undocumented
Class OpcodeParams Custom directive for opcode parameters.
Class OpcodeResult Custom directive for opcode result.
Class PythonAssert Custom directive for writing assertions.
Class RapiAccessTable Custom directive to generate table of all RAPI resources.
Class RapiResourceDetails Custom directive for RAPI resource details.
Exception ReSTError Custom class for generating errors in Sphinx.
Function BuildQueryFields Build query fields documentation.
Function BuildValuesDoc Builds documentation for a list of values
Function PythonEvalRole Custom role to evaluate Python expressions.
Function setup Sphinx extension callback.
Constant COMMON_PARAM_NAMES Undocumented
Constant CV_ECODES_DOC Undocumented
Constant CV_ECODES_DOC_LIST Undocumented
Constant DOCUMENTED_CONSTANTS Undocumented
Constant EVAL_NS Undocumented
Constant RAPI_URI_ENCODE_RE Undocumented
Variable orig_manpage_role Undocumented
Class _ManPageXRefRole No class docstring; 0/1 instance variable, 2/2 methods documented
Class _RapiHandlersForDocsHelper No class docstring; 1/1 static method, 2/2 class methods documented
Function _BuildOpcodeParams Build opcode parameter documentation.
Function _BuildOpcodeResult Build opcode result documentation.
Function _BuildRapiAccessTable Build a table with access permissions needed for all RAPI resources.
Function _DescribeHandlerAccess Returns textual description of required RAPI permissions.
Function _EncodeRapiResourceLink Encodes a RAPI resource URI for use as a link target.
Function _GetCommonParamNames Builds a list of parameters common to all opcodes.
Function _GetHandlerMethods Returns list of HTTP methods supported by handler class.
Function _MakeRapiResourceLink Generates link target name for RAPI resource.
Function _ManPageNodeClass Generates a pending XRef like a ":doc:`...`" reference.
Function _ManPageRole Custom role for man page references.
Function _ParseAlias Parse simple assignment option.
Function _SplitOption Split simple option list.
Constant _MAN_RE Undocumented
Constant _RAPI_RESOURCES_FOR_DOCS Undocumented
Constant _TAB_WIDTH Undocumented
def BuildQueryFields(fields):

Build query fields documentation.

Parameters
fields:dict (field name as key, field details as value)Undocumented
def BuildValuesDoc(values):

Builds documentation for a list of values

Parameters
values:list of tuples in the form (value, documentation)Undocumented
def PythonEvalRole(role, rawtext, text, lineno, inliner, options={}, content=[]):

Custom role to evaluate Python expressions.

The expression's result is included as a literal.

def setup(app):

Sphinx extension callback.

COMMON_PARAM_NAMES =

Undocumented

Value
_GetCommonParamNames()
CV_ECODES_DOC: str =

Undocumented

Value
'ecodes'
CV_ECODES_DOC_LIST =

Undocumented

Value
[(name, doc) for _, name, doc in constants.CV_ALL_ECODES]
DOCUMENTED_CONSTANTS =

Undocumented

Value
{CV_ECODES_DOC: sorted(CV_ECODES_DOC_LIST, key=(lambda tup: tup[0]))}
EVAL_NS =

Undocumented

Value
dict(compat=compat,
     constants=constants,
     utils=utils,
     errors=errors,
     rlib2=rapi.rlib2,
     luxi=luxi,
     rapi=rapi,
...
RAPI_URI_ENCODE_RE =

Undocumented

Value
re.compile(r'[^_a-z0-9]+',
           re.I)
orig_manpage_role =

Undocumented

def _BuildOpcodeParams(op_id, include, exclude, alias):

Build opcode parameter documentation.

Parameters
op_id:stringOpcode ID
includeUndocumented
excludeUndocumented
aliasUndocumented
def _BuildOpcodeResult(op_id):

Build opcode result documentation.

Parameters
op_id:stringOpcode ID
def _BuildRapiAccessTable(res):

Build a table with access permissions needed for all RAPI resources.

def _DescribeHandlerAccess(handler, method):

Returns textual description of required RAPI permissions.

Parameters
handler:rapi.baserlib.ResourceBaseHandler class
method:stringHTTP method (e.g. http.HTTP_GET)
Returns
stringUndocumented
def _EncodeRapiResourceLink(method, uri):

Encodes a RAPI resource URI for use as a link target.

def _GetCommonParamNames():

Builds a list of parameters common to all opcodes.

def _GetHandlerMethods(handler):

Returns list of HTTP methods supported by handler class.

Parameters
handler:rapi.baserlib.ResourceBaseHandler class
Returns
list of stringsUndocumented
def _MakeRapiResourceLink(method, uri):

Generates link target name for RAPI resource.

def _ManPageNodeClass(*args, **kwargs):

Generates a pending XRef like a ":doc:`...`" reference.

def _ManPageRole(typ, rawtext, text, lineno, inliner, options={}, content=[]):

Custom role for man page references.

Converts man pages to links if enabled during the build.

def _ParseAlias(text):

Parse simple assignment option.

Parameters
text:stringAssignments, e.g. "foo=bar, hello=world"
Returns
dictUndocumented
def _SplitOption(text):

Split simple option list.

Parameters
text:stringOptions, e.g. "foo, bar, baz"
_MAN_RE =

Undocumented

Value
re.compile(r'^(?P<name>[-\w_]+)\((?P<section>\d+)\)$')
_RAPI_RESOURCES_FOR_DOCS =

Undocumented

Value
_RapiHandlersForDocsHelper.Build()
_TAB_WIDTH: int =

Undocumented

Value
2