summaryrefslogtreecommitdiff
path: root/sphinx/config.py
diff options
context:
space:
mode:
authorTakeshi KOMIYA <i.tkomiya@gmail.com>2018-02-14 22:57:20 +0900
committerTakeshi KOMIYA <i.tkomiya@gmail.com>2018-02-14 22:57:38 +0900
commita073e17537c2aacaac305feadea58d4473ec97f4 (patch)
treeb3ef3d0ad15132c4e5ae5064f9c7b678fbcad120 /sphinx/config.py
parent91807f882dafbd6185b8d88c0bf4cbf97cf520fb (diff)
downloadsphinx-git-a073e17537c2aacaac305feadea58d4473ec97f4.tar.gz
Use typing.TYPE_CHECKING for typehints
Diffstat (limited to 'sphinx/config.py')
-rw-r--r--sphinx/config.py5
1 files changed, 2 insertions, 3 deletions
diff --git a/sphinx/config.py b/sphinx/config.py
index 1f80ab366..4f8bf969d 100644
--- a/sphinx/config.py
+++ b/sphinx/config.py
@@ -12,7 +12,7 @@
import re
import traceback
from os import path, getenv
-from typing import Any, NamedTuple, Union
+from typing import TYPE_CHECKING, Any, NamedTuple, Union
from six import PY2, PY3, iteritems, string_types, binary_type, text_type, integer_types
@@ -23,8 +23,7 @@ from sphinx.util.i18n import format_date
from sphinx.util.osutil import cd
from sphinx.util.pycompat import execfile_, NoneType
-if False:
- # For type annotation
+if TYPE_CHECKING:
from typing import Any, Callable, Dict, Iterable, Iterator, List, Tuple, Union # NOQA
from sphinx.util.tags import Tags # NOQA