summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTakeshi KOMIYA <i.tkomiya@gmail.com>2018-03-26 02:02:19 +0900
committerTakeshi KOMIYA <i.tkomiya@gmail.com>2018-03-26 02:02:19 +0900
commitf9ae69d9b003b4839b39b0abc26b6a607b7e08bd (patch)
tree1e7de5710ae07c493cdb3eb5bf902cd2f81f657a
parent5734d8ad02116004721bca90df2719fdab7c9eb9 (diff)
downloadsphinx-git-f9ae69d9b003b4839b39b0abc26b6a607b7e08bd.tar.gz
Drop typing.TYPE_CHECKING
-rw-r--r--sphinx/apidoc.py4
-rw-r--r--sphinx/ext/extlinks.py5
-rw-r--r--sphinx/ext/githubpages.py4
-rw-r--r--sphinx/ext/jsmath.py6
-rw-r--r--sphinx/ext/mathjax.py5
-rw-r--r--sphinx/quickstart.py4
-rw-r--r--sphinx/testing/path.py4
7 files changed, 14 insertions, 18 deletions
diff --git a/sphinx/apidoc.py b/sphinx/apidoc.py
index f6616e497..dffa4a9ef 100644
--- a/sphinx/apidoc.py
+++ b/sphinx/apidoc.py
@@ -10,12 +10,12 @@
"""
import warnings
-from typing import TYPE_CHECKING
from sphinx.deprecation import RemovedInSphinx20Warning
from sphinx.ext.apidoc import main as _main
-if TYPE_CHECKING:
+if False:
+ # For type annotation
from typing import Any # NOQA
from sphinx.application import Sphinx # NOQA
diff --git a/sphinx/ext/extlinks.py b/sphinx/ext/extlinks.py
index 53b051c45..29bfe928f 100644
--- a/sphinx/ext/extlinks.py
+++ b/sphinx/ext/extlinks.py
@@ -24,15 +24,14 @@
:license: BSD, see LICENSE for details.
"""
-from typing import TYPE_CHECKING
-
from docutils import nodes, utils
from six import iteritems
import sphinx
from sphinx.util.nodes import split_explicit_title
-if TYPE_CHECKING:
+if False:
+ # For type annotation
from typing import Any, Dict, List, Tuple # NOQA
from docutils.parsers.rst.states import Inliner # NOQA
from sphinx.application import Sphinx # NOQA
diff --git a/sphinx/ext/githubpages.py b/sphinx/ext/githubpages.py
index f97c810f8..bd7061fb7 100644
--- a/sphinx/ext/githubpages.py
+++ b/sphinx/ext/githubpages.py
@@ -10,11 +10,11 @@
"""
import os
-from typing import TYPE_CHECKING
import sphinx
-if TYPE_CHECKING:
+if False:
+ # For type annotation
from typing import Any, Dict # NOQA
from sphinx.application import Sphinx # NOQA
from sphinx.environment import BuildEnvironment # NOQA
diff --git a/sphinx/ext/jsmath.py b/sphinx/ext/jsmath.py
index e523b54c8..b377a6479 100644
--- a/sphinx/ext/jsmath.py
+++ b/sphinx/ext/jsmath.py
@@ -10,8 +10,6 @@
:license: BSD, see LICENSE for details.
"""
-from typing import TYPE_CHECKING
-
from docutils import nodes
import sphinx
@@ -20,8 +18,8 @@ from sphinx.ext.mathbase import get_node_equation_number
from sphinx.ext.mathbase import setup_math as mathbase_setup
from sphinx.locale import _
-
-if TYPE_CHECKING:
+if False:
+ # For type annotation
from typing import Any, Dict # NOQA
from sphinx.application import Sphinx # NOQA
diff --git a/sphinx/ext/mathjax.py b/sphinx/ext/mathjax.py
index 9f8013b2b..e3f7afebe 100644
--- a/sphinx/ext/mathjax.py
+++ b/sphinx/ext/mathjax.py
@@ -11,8 +11,6 @@
:license: BSD, see LICENSE for details.
"""
-from typing import TYPE_CHECKING
-
from docutils import nodes
import sphinx
@@ -21,7 +19,8 @@ from sphinx.ext.mathbase import get_node_equation_number
from sphinx.ext.mathbase import setup_math as mathbase_setup
from sphinx.locale import _
-if TYPE_CHECKING:
+if False:
+ # For type annotation
from typing import Any, Dict # NOQA
from sphinx.application import Sphinx # NOQA
diff --git a/sphinx/quickstart.py b/sphinx/quickstart.py
index dbdfb47c1..8cad0640b 100644
--- a/sphinx/quickstart.py
+++ b/sphinx/quickstart.py
@@ -10,12 +10,12 @@
"""
import warnings
-from typing import TYPE_CHECKING
from sphinx.cmd.quickstart import main as _main
from sphinx.deprecation import RemovedInSphinx20Warning
-if TYPE_CHECKING:
+if False:
+ # For type annotation
from typing import Any # NOQA
diff --git a/sphinx/testing/path.py b/sphinx/testing/path.py
index 5f59ad30b..209046246 100644
--- a/sphinx/testing/path.py
+++ b/sphinx/testing/path.py
@@ -10,11 +10,11 @@ import os
import shutil
import sys
from io import open
-from typing import TYPE_CHECKING
from six import PY2, text_type
-if TYPE_CHECKING:
+if False:
+ # For type annotation
from typing import Any, Callable, IO, List # NOQA