Skip to content
Back to top
View this page

# `autodoc2.sphinx.docstring`

## Module Contents

### Classes

`DocstringRenderer` |

### Functions

`parser_options` |
`summary_option` |
`parsing_context` |
`change_source` |
`_example` |

### API

autodoc2.sphinx.docstring.parser_options(argument: str) → docutils.parsers.Parser | None

autodoc2.sphinx.docstring.summary_option(argument: str) → int | None

class autodoc2.sphinx.docstring.DocstringRenderer(name, arguments, options, content, lineno, content_offset, block_text, state, state_machine)

  Bases: `sphinx.util.docutils.SphinxDirective`

  Initialization

  has_content = False
  required_arguments = 1
  optional_arguments = 0
  final_argument_whitespace = True
  option_spec: ClassVar[dict[str, Any]] = None
  run() → list[docutils.nodes.Node]

autodoc2.sphinx.docstring.parsing_context() → Generator[None, None, None]

autodoc2.sphinx.docstring.change_source(state: docutils.parsers.rst.states.RSTStateMachine, source_path: str, line_offset: int) → Generator[None, None, None]

autodoc2.sphinx.docstring._example(a: int, b: str) → None