summaryrefslogtreecommitdiff
path: root/sphinx/ext/autodoc/directive.py
diff options
context:
space:
mode:
authorjfbu <jfbu@free.fr>2019-08-01 17:49:24 +0200
committerjfbu <jfbu@free.fr>2019-08-01 17:49:24 +0200
commit685e3fdb49c42b464e09ec955e1033e2a8729fff (patch)
treea7ad90fbd9c2a076575f612caf0d6baa7c4fb555 /sphinx/ext/autodoc/directive.py
parenteeca5ee91d2da817d4ad9e920ad7e4cabd966d08 (diff)
parent5a86a71a8fe6d4e8c3861f755cc9b05b5b10f0cf (diff)
downloadsphinx-git-685e3fdb49c42b464e09ec955e1033e2a8729fff.tar.gz
Merge branch '2.0'
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: