diff options
author | Takeshi KOMIYA <i.tkomiya@gmail.com> | 2018-02-14 22:57:20 +0900 |
---|---|---|
committer | Takeshi KOMIYA <i.tkomiya@gmail.com> | 2018-02-14 22:57:38 +0900 |
commit | a073e17537c2aacaac305feadea58d4473ec97f4 (patch) | |
tree | b3ef3d0ad15132c4e5ae5064f9c7b678fbcad120 /sphinx/config.py | |
parent | 91807f882dafbd6185b8d88c0bf4cbf97cf520fb (diff) | |
download | sphinx-git-a073e17537c2aacaac305feadea58d4473ec97f4.tar.gz |
Use typing.TYPE_CHECKING for typehints
Diffstat (limited to 'sphinx/config.py')
-rw-r--r-- | sphinx/config.py | 5 |
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 |