summaryrefslogtreecommitdiff
path: root/sphinx/config.py
diff options
context:
space:
mode:
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