summaryrefslogtreecommitdiff
path: root/sphinx/roles.py
diff options
context:
space:
mode:
Diffstat (limited to 'sphinx/roles.py')
-rw-r--r--sphinx/roles.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/sphinx/roles.py b/sphinx/roles.py
index 2971c8fc3..a5142e8e9 100644
--- a/sphinx/roles.py
+++ b/sphinx/roles.py
@@ -10,6 +10,7 @@
"""
import re
+from typing import TYPE_CHECKING
from docutils import nodes, utils
from six import iteritems
@@ -21,8 +22,7 @@ from sphinx.util import ws_re
from sphinx.util.nodes import split_explicit_title, process_index_entry, \
set_role_source_info
-if False:
- # For type annotation
+if TYPE_CHECKING:
from typing import Any, Dict, List, Tuple, Type # NOQA
from docutils.parsers.rst.states import Inliner # NOQA
from sphinx.application import Sphinx # NOQA