diff options
Diffstat (limited to 'sphinx/ext/autodoc/directive.py')
-rw-r--r-- | sphinx/ext/autodoc/directive.py | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/sphinx/ext/autodoc/directive.py b/sphinx/ext/autodoc/directive.py index 1f773b6e9..3761d26d2 100644 --- a/sphinx/ext/autodoc/directive.py +++ b/sphinx/ext/autodoc/directive.py @@ -19,7 +19,8 @@ from sphinx.util.nodes import nested_parse_with_titles if False: # For type annotation from typing import Any, Callable, Dict, List, Set, Type # NOQA - from docutils.statemachine import State, StateMachine, StringList # NOQA + from docutils.parsers.rst.state import RSTState # NOQA + from docutils.statemachine import StateMachine, StringList # NOQA from docutils.utils import Reporter # NOQA from sphinx.config import Config # NOQA from sphinx.environment import BuildEnvironment # NOQA @@ -80,7 +81,7 @@ def process_documenter_options(documenter, config, options): def parse_generated_content(state, content, documenter): - # type: (State, StringList, Documenter) -> List[nodes.Node] + # type: (RSTState, StringList, Documenter) -> List[nodes.Node] """Parse a generated content by Documenter.""" with switch_source_input(state, content): if documenter.titles_allowed: |