diff options
Diffstat (limited to 'sphinx/ext/mathbase.py')
-rw-r--r-- | sphinx/ext/mathbase.py | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/sphinx/ext/mathbase.py b/sphinx/ext/mathbase.py index 24c10df3c..15218963f 100644 --- a/sphinx/ext/mathbase.py +++ b/sphinx/ext/mathbase.py @@ -9,6 +9,8 @@ :license: BSD, see LICENSE for details. """ +from typing import TYPE_CHECKING + from docutils import nodes, utils from docutils.nodes import make_id from docutils.parsers.rst import Directive, directives @@ -20,8 +22,7 @@ from sphinx.roles import XRefRole from sphinx.util import logging from sphinx.util.nodes import make_refnode, set_source_info -if False: - # For type annotation +if TYPE_CHECKING: from typing import Any, Callable, Dict, Iterable, List, Tuple # NOQA from docutils.parsers.rst.states import Inliner # NOQA from sphinx.application import Sphinx # NOQA |