autoclasstoc.AutoClassToc
- class autoclasstoc.AutoClassToc(name, arguments, options, content, lineno, content_offset, block_text, state, state_machine)
Generate a succinct TOC for automatically documented classes.
This class implements the
autoclasstoc
directive. More specifically, it implements therun
function as expected by docutils. However, most of the actual logic is delegated to other classes and functions.Public Data Attributes:
Number of optional arguments after the required arguments.
Mapping of option names to validator functions.
Inherited from
SphinxDirective
env
Reference to the
BuildEnvironment
object.config
Reference to the
Config
object.Inherited from
Directive
Number of required directive arguments.
Number of optional arguments after the required arguments.
May the final argument contain whitespace?
Mapping of option names to validator functions.
May the directive have content?
Public Methods:
run
()Create the nodes that will represent the class TOC.
Inherited from
SphinxDirective
get_source_info
()Get source and line number.
set_source_info
(node)Set source and line number to the node.
get_location
()Get current location info for logging.
Inherited from
Directive
__init__
(name, arguments, options, content, ...)run
()directive_error
(level, message)Return a DirectiveError suitable for being thrown as an exception.
debug
(message)info
(message)warning
(message)error
(message)severe
(message)assert_has_content
()Throw an ERROR-level DirectiveError if the directive doesn't have contents.
add_name
(node)Append self.options['name'] to node['names'] if it exists.
Full Documentation:
- option_spec = {'exclude-sections': <function comma_separated_list>, 'sections': <function comma_separated_list>}
Mapping of option names to validator functions.
- optional_arguments = 1
Number of optional arguments after the required arguments.