Automodsumm

class plasmapy_sphinx.automodsumm.core.Automodsumm(name, arguments, options, content, lineno, content_offset, block_text, state, state_machine)

Bases: sphinx.ext.autosummary.Autosummary

The class that defines the automodsumm directive.

Attributes Summary

config

Reference to the Config object.

env

Reference to the BuildEnvironment object.

final_argument_whitespace

May the final argument contain whitespace?

genopt

Deprecated since version Sphinx: 2.0.0

has_content

May the directive have content?

option_spec

Mapping of option names to validator functions.

optional_arguments

Number of optional arguments after the required arguments.

required_arguments

Number of required directive arguments.

result

A docutils.statemachine.StringList representing the lines of the directive.

warnings

Deprecated since version Sphinx: 2.0.0

Methods Summary

add_name(node)

Append self.options['name'] to node['names'] if it exists.

assert_has_content()

Throw an ERROR-level DirectiveError if the directive doesn't have contents.

create_documenter(app, obj, parent, full_name)

Get an autodoc.Documenter class suitable for documenting the given object.

debug(message)

level=0 directive_error()

directive_error(level, message)

Return a DirectiveError suitable for being thrown as an exception.

error(message)

level=3 directive_error()

get_items(names)

Try to import the given names, and return a list of [(name, signature, summary_string, real_name), ...].

get_location()

Get current location info for logging.

get_source_info()

Get source and line number.

get_table(items)

Generate a proper list of table nodes for autosummary:: directive.

import_by_name(name, prefixes)

See sphinx.ext.autosummary.import_by_name()

info(message)

level=1 directive_error()

option_processor()

Instance of Automodsumm so further processing (beyond option_spec) of directive options can be performed.

run()

This method is called whenever the automodsumm directive is found in a document.

set_source_info(node)

Set source and line number to the node.

severe(message)

level=4 directive_error()

warn(msg)

Deprecated since version Sphinx: 2.0.0

warning(message)

level=2 directive_error()

Attributes Documentation

config

Reference to the Config object.

env

Reference to the BuildEnvironment object.

final_argument_whitespace = False

May the final argument contain whitespace?

genopt

Deprecated since version Sphinx: 2.0.0

has_content = False

May the directive have content?

option_spec: Dict[str, Callable[[str], Any]] = {'caption': <function unchanged_required>, 'exclude-groups': <function option_str_list>, 'groups': <function option_str_list>, 'nosignatures': <function flag>, 'recursive': <function flag>, 'skip': <function option_str_list>, 'template': <function unchanged>, 'toctree': <function unchanged>}

Mapping of option names to validator functions.

optional_arguments = 0

Number of optional arguments after the required arguments.

required_arguments = 1

Number of required directive arguments.

result

A docutils.statemachine.StringList representing the lines of the directive.

warnings

Deprecated since version Sphinx: 2.0.0

Methods Documentation

add_name(node)

Append self.options[‘name’] to node[‘names’] if it exists.

Also normalize the name string and register it as explicit target.

assert_has_content()

Throw an ERROR-level DirectiveError if the directive doesn’t have contents.

create_documenter(app: sphinx.application.Sphinx, obj: Any, parent: Any, full_name: str) sphinx.ext.autodoc.Documenter

Get an autodoc.Documenter class suitable for documenting the given object.

Wraps get_documenter and is meant as a hook for extensions.

debug(message)

level=0 directive_error()

directive_error(level, message)

Return a DirectiveError suitable for being thrown as an exception.

Call “raise self.directive_error(level, message)” from within a directive implementation to return one single system message at level level, which automatically gets the directive block and the line number added.

Preferably use the debug, info, warning, error, or severe wrapper methods, e.g. self.error(message) to generate an ERROR-level directive error.

error(message)

level=3 directive_error()

get_items(names)

Try to import the given names, and return a list of [(name, signature, summary_string, real_name), ...].

get_location() str

Get current location info for logging.

get_source_info() Tuple[str, int]

Get source and line number.

get_table(items: List[Tuple[str, str, str, str]]) List[docutils.nodes.Node]

Generate a proper list of table nodes for autosummary:: directive.

items is a list produced by get_items().

import_by_name(name: str, prefixes: List[str]) Tuple[str, Any, Any, str]

See sphinx.ext.autosummary.import_by_name()

info(message)

level=1 directive_error()

option_processor()

Instance of Automodsumm so further processing (beyond option_spec) of directive options can be performed.

run()

This method is called whenever the automodsumm directive is found in a document. It is used to do any further manipulation of the directive, its options, and its content to get the desired rendered outcome.

set_source_info(node: docutils.nodes.Node) None

Set source and line number to the node.

severe(message)

level=4 directive_error()

warn(msg: str) None

Deprecated since version Sphinx: 2.0.0

warning(message)

level=2 directive_error()