summaryrefslogtreecommitdiff
path: root/sphinx/util/logging.py
diff options
context:
space:
mode:
Diffstat (limited to 'sphinx/util/logging.py')
-rw-r--r--sphinx/util/logging.py7
1 files changed, 3 insertions, 4 deletions
diff --git a/sphinx/util/logging.py b/sphinx/util/logging.py
index 5889f3860..5206363a5 100644
--- a/sphinx/util/logging.py
+++ b/sphinx/util/logging.py
@@ -12,7 +12,8 @@ import logging
import logging.handlers
from collections import defaultdict
from contextlib import contextmanager
-from typing import Any, Dict, Generator, IO, List, Tuple, Union
+from typing import Any, Dict, Generator, IO, List, Tuple, Type, Union
+from typing import TYPE_CHECKING
from docutils import nodes
from docutils.nodes import Node
@@ -21,9 +22,7 @@ from docutils.utils import get_source_line
from sphinx.errors import SphinxWarning
from sphinx.util.console import colorize
-if False:
- # For type annotation
- from typing import Type # for python3.5.1
+if TYPE_CHECKING:
from sphinx.application import Sphinx