summaryrefslogtreecommitdiff
path: root/sphinx/ext/autodoc/__init__.py
diff options
context:
space:
mode:
authorTakeshi KOMIYA <i.tkomiya@gmail.com>2020-03-07 10:45:39 +0900
committerTakeshi KOMIYA <i.tkomiya@gmail.com>2020-03-07 19:36:41 +0900
commit6d4fefebf4ecee4416da016d8e647298003fb57a (patch)
treea0f8dedd36b9562a248bcf8bc8eab91d09136a58 /sphinx/ext/autodoc/__init__.py
parent3e0618ba3a84c7db51813cab43779d11c5fe7802 (diff)
downloadsphinx-git-6d4fefebf4ecee4416da016d8e647298003fb57a.tar.gz
Deprecate codes for python 3.5
Diffstat (limited to 'sphinx/ext/autodoc/__init__.py')
-rw-r--r--sphinx/ext/autodoc/__init__.py7
1 files changed, 3 insertions, 4 deletions
diff --git a/sphinx/ext/autodoc/__init__.py b/sphinx/ext/autodoc/__init__.py
index 7abd6c879..025d4a091 100644
--- a/sphinx/ext/autodoc/__init__.py
+++ b/sphinx/ext/autodoc/__init__.py
@@ -14,7 +14,7 @@ import importlib
import re
import warnings
from types import ModuleType
-from typing import Any, Callable, Dict, Iterator, List, Sequence, Set, Tuple, Union
+from typing import Any, Callable, Dict, Iterator, List, Sequence, Set, Tuple, Type, Union
from docutils.statemachine import StringList
@@ -36,7 +36,6 @@ from sphinx.util.typing import stringify as stringify_typehint
if False:
# For type annotation
- from typing import Type # NOQA # for python3.5.1
from sphinx.ext.autodoc.directive import DocumenterBridge
@@ -262,7 +261,7 @@ class Documenter:
self.analyzer = None # type: ModuleAnalyzer
@property
- def documenters(self) -> Dict[str, "Type[Documenter]"]:
+ def documenters(self) -> Dict[str, Type["Documenter"]]:
"""Returns registered Documenter classes"""
return get_documenters(self.env.app)
@@ -1591,7 +1590,7 @@ class SlotsAttributeDocumenter(AttributeDocumenter):
return []
-def get_documenters(app: Sphinx) -> Dict[str, "Type[Documenter]"]:
+def get_documenters(app: Sphinx) -> Dict[str, Type[Documenter]]:
"""Returns registered Documenter classes"""
return app.registry.documenters