summaryrefslogtreecommitdiff
path: root/sphinx/ext/autodoc/directive.py
diff options
context:
space:
mode:
authorTakeshi KOMIYA <i.tkomiya@gmail.com>2018-12-10 22:46:54 +0900
committerTakeshi KOMIYA <i.tkomiya@gmail.com>2018-12-10 22:59:47 +0900
commitf48ccd029da9e242100d936be970126f62ace4a2 (patch)
treefabeef8cad166423363ac76ddd41c53362967c49 /sphinx/ext/autodoc/directive.py
parent63af636fd913ec696c6011a9693cf75ef53150c9 (diff)
downloadsphinx-git-f48ccd029da9e242100d936be970126f62ace4a2.tar.gz
Fix annotations
Diffstat (limited to 'sphinx/ext/autodoc/directive.py')
-rw-r--r--sphinx/ext/autodoc/directive.py5
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: