summaryrefslogtreecommitdiff
path: root/sphinx/ext/jsmath.py
diff options
context:
space:
mode:
authorTakeshi KOMIYA <i.tkomiya@gmail.com>2019-07-03 02:28:49 +0900
committerTakeshi KOMIYA <i.tkomiya@gmail.com>2019-07-04 11:49:09 +0900
commit6a9b6d20dc7aa7ff5710c0d9e10c38953106e489 (patch)
tree69baf0cf77b51bcd515161dc9c8a291b93b4cd5a /sphinx/ext/jsmath.py
parent31f93f38dc631b7192ab2dcecc151714835b714d (diff)
downloadsphinx-git-6a9b6d20dc7aa7ff5710c0d9e10c38953106e489.tar.gz
Migrate to py3 style type annotation: sphinx.ext.jsmath
Diffstat (limited to 'sphinx/ext/jsmath.py')
-rw-r--r--sphinx/ext/jsmath.py10
1 files changed, 3 insertions, 7 deletions
diff --git a/sphinx/ext/jsmath.py b/sphinx/ext/jsmath.py
index 47e1b1836..84f191a5e 100644
--- a/sphinx/ext/jsmath.py
+++ b/sphinx/ext/jsmath.py
@@ -10,6 +10,7 @@
"""
import warnings
+from typing import Any, Dict
from sphinxcontrib.jsmath import ( # NOQA
html_visit_math,
@@ -18,16 +19,11 @@ from sphinxcontrib.jsmath import ( # NOQA
)
import sphinx
+from sphinx.application import Sphinx
from sphinx.deprecation import RemovedInSphinx40Warning
-if False:
- # For type annotation
- from typing import Any, Dict # NOQA
- from sphinx.application import Sphinx # NOQA
-
-def setup(app):
- # type: (Sphinx) -> Dict[str, Any]
+def setup(app: Sphinx) -> Dict[str, Any]:
warnings.warn('sphinx.ext.jsmath has been moved to sphinxcontrib-jsmath.',
RemovedInSphinx40Warning)