summaryrefslogtreecommitdiff
path: root/sphinx/registry.py
diff options
context:
space:
mode:
Diffstat (limited to 'sphinx/registry.py')
-rw-r--r--sphinx/registry.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/sphinx/registry.py b/sphinx/registry.py
index 28da0435e..3ab3a69a0 100644
--- a/sphinx/registry.py
+++ b/sphinx/registry.py
@@ -11,6 +11,7 @@
from __future__ import print_function
import traceback
+from typing import TYPE_CHECKING
from pkg_resources import iter_entry_points
from six import iteritems, itervalues, string_types
@@ -27,8 +28,7 @@ from sphinx.util import logging
from sphinx.util.console import bold # type: ignore
from sphinx.util.docutils import directive_helper
-if False:
- # For type annotation
+if TYPE_CHECKING:
from typing import Any, Callable, Dict, Iterator, List, Type, Union # NOQA
from docutils import nodes # NOQA
from docutils.io import Input # NOQA