bundles / papyri latest / papyri / nodes / Directive
class
papyri.nodes:Directive
source: /papyri/nodes.py :439
Signature
class Directive ( * args : Any , ** kwargs : Any ) → None Members
Summary
Transient carrier for an RST directive papyri has no handler for.
Extended Summary
DirectiveVisiter emits one of these when it meets a directive name with no registered handler, purely so the name survives long enough to be reported. A Directive is deliberately not serializable: encoding one (to CBOR or JSON) raises and names the offending directive. That forces the maintainer to register at least a drop or verbatim handler for it (e.g. papyri.directives:drop to discard it, or papyri.directives:code_handler to keep its body verbatim) before the bundle can be produced — an unhandled directive can never silently leak into the IR.
name is the directive name (e.g. "plot"); args is the argument line; options holds the :key: value option block; value is the raw body text; children holds any parsed child nodes.
Aliases
-
papyri.nodes.Directive