diff options
Diffstat (limited to 'sphinx/util/nodes.py')
-rw-r--r-- | sphinx/util/nodes.py | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/sphinx/util/nodes.py b/sphinx/util/nodes.py index 6a3c6591d..406511815 100644 --- a/sphinx/util/nodes.py +++ b/sphinx/util/nodes.py @@ -11,7 +11,7 @@ import re import warnings from typing import Any, Callable, Iterable, List, Set, Tuple, Type -from typing import cast +from typing import TYPE_CHECKING, cast from docutils import nodes from docutils.nodes import Element, Node @@ -24,8 +24,7 @@ from sphinx.deprecation import RemovedInSphinx40Warning from sphinx.locale import __ from sphinx.util import logging -if False: - # For type annotation +if TYPE_CHECKING: from sphinx.builders import Builder from sphinx.environment import BuildEnvironment from sphinx.utils.tags import Tags |