summaryrefslogtreecommitdiff
path: root/sphinx/ext/autodoc/directive.py
diff options
context:
space:
mode:
authorTakeshi KOMIYA <i.tkomiya@gmail.com>2019-07-13 23:29:38 +0900
committerTakeshi KOMIYA <i.tkomiya@gmail.com>2019-07-13 23:46:17 +0900
commit0c48a28ad7216ee064b0db564745d749c049bfd5 (patch)
tree2bc2f13992c930c00bd3b60ea3e2c27c31e659cd /sphinx/ext/autodoc/directive.py
parent0bc530f1b7b3303e0f53e42010b629d67e79b835 (diff)
downloadsphinx-git-0c48a28ad7216ee064b0db564745d749c049bfd5.tar.gz
Fix type annotation for python 3.5.1
Diffstat (limited to 'sphinx/ext/autodoc/directive.py')
-rw-r--r--sphinx/ext/autodoc/directive.py9
1 files changed, 7 insertions, 2 deletions
diff --git a/sphinx/ext/autodoc/directive.py b/sphinx/ext/autodoc/directive.py
index 953e3c44c..b44bd75b3 100644
--- a/sphinx/ext/autodoc/directive.py
+++ b/sphinx/ext/autodoc/directive.py
@@ -7,7 +7,7 @@
"""
import warnings
-from typing import Any, Callable, Dict, List, Set, Type
+from typing import Any, Callable, Dict, List, Set
from docutils import nodes
from docutils.nodes import Element, Node
@@ -23,6 +23,11 @@ from sphinx.util import logging
from sphinx.util.docutils import SphinxDirective, switch_source_input
from sphinx.util.nodes import nested_parse_with_titles
+if False:
+ # For type annotation
+ from typing import Type # for python3.5.1
+
+
logger = logging.getLogger(__name__)
@@ -70,7 +75,7 @@ class DocumenterBridge:
logger.warning(msg, location=(self.env.docname, self.lineno))
-def process_documenter_options(documenter: Type[Documenter], config: Config, options: Dict
+def process_documenter_options(documenter: "Type[Documenter]", config: Config, options: Dict
) -> Options:
"""Recognize options of Documenter from user input."""
for name in AUTODOC_DEFAULT_OPTIONS: