blark.sphinxdomain.DeclarationDirective
- class blark.sphinxdomain.DeclarationDirective(name, arguments, options, content, lineno, content_offset, block_text, state, state_machine)[source]
 Bases:
BlarkDirectiveMethods
handle_signature(sig, signode)Parse the signature sig into individual nodes and append them to signode.
transform_content(contentnode)Called after creating the content through nested parsing, but before the
object-description-transformevent is emitted, and before the info-fields are transformed.Attributes
configReference to the
Configobject.doc_field_typesdomainenvReference to the
BuildEnvironmentobject.final_argument_whitespaceMay the final argument contain whitespace?
has_contentMay the directive have content?
indexnodeobjtypeoption_specMapping of option names to validator functions.
optional_argumentsNumber of optional arguments after the required arguments.
required_argumentsNumber of required directive arguments.
nameThe role name actually used in the document.
rawtextA string containing the entire interpreted text input.
textThe interpreted text content.
linenoThe line number where the interpreted text begins.
optionsA dictionary of directive options for customization ("role" directive).
contentA list of strings, the directive content for customization ("role" directive).
- obj: DeclarationSummary
 
- handle_signature(sig: str, signode: desc_signature) Tuple[str, str][source]
 Parse the signature sig into individual nodes and append them to signode. If ValueError is raised, parsing is aborted and the whole sig is put into a single desc_name node.
The return value should be a value that identifies the object. It is passed to
add_target_and_index()unchanged, and otherwise only used to skip duplicates.