summaryrefslogtreecommitdiff
path: root/sphinx/ext/mathbase.py
diff options
context:
space:
mode:
authorTakeshi KOMIYA <i.tkomiya@gmail.com>2018-02-14 22:57:20 +0900
committerTakeshi KOMIYA <i.tkomiya@gmail.com>2018-02-14 22:57:38 +0900
commita073e17537c2aacaac305feadea58d4473ec97f4 (patch)
treeb3ef3d0ad15132c4e5ae5064f9c7b678fbcad120 /sphinx/ext/mathbase.py
parent91807f882dafbd6185b8d88c0bf4cbf97cf520fb (diff)
downloadsphinx-git-a073e17537c2aacaac305feadea58d4473ec97f4.tar.gz
Use typing.TYPE_CHECKING for typehints
Diffstat (limited to 'sphinx/ext/mathbase.py')
-rw-r--r--sphinx/ext/mathbase.py5
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