Drop typing.TYPE_CHECKING

This commit is contained in:
Takeshi KOMIYA 2018-03-26 02:02:19 +09:00
parent 5734d8ad02
commit f9ae69d9b0
7 changed files with 14 additions and 18 deletions

View File

@ -10,12 +10,12 @@
""" """
import warnings import warnings
from typing import TYPE_CHECKING
from sphinx.deprecation import RemovedInSphinx20Warning from sphinx.deprecation import RemovedInSphinx20Warning
from sphinx.ext.apidoc import main as _main from sphinx.ext.apidoc import main as _main
if TYPE_CHECKING: if False:
# For type annotation
from typing import Any # NOQA from typing import Any # NOQA
from sphinx.application import Sphinx # NOQA from sphinx.application import Sphinx # NOQA

View File

@ -24,15 +24,14 @@
:license: BSD, see LICENSE for details. :license: BSD, see LICENSE for details.
""" """
from typing import TYPE_CHECKING
from docutils import nodes, utils from docutils import nodes, utils
from six import iteritems from six import iteritems
import sphinx import sphinx
from sphinx.util.nodes import split_explicit_title 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 typing import Any, Dict, List, Tuple # NOQA
from docutils.parsers.rst.states import Inliner # NOQA from docutils.parsers.rst.states import Inliner # NOQA
from sphinx.application import Sphinx # NOQA from sphinx.application import Sphinx # NOQA

View File

@ -10,11 +10,11 @@
""" """
import os import os
from typing import TYPE_CHECKING
import sphinx import sphinx
if TYPE_CHECKING: if False:
# For type annotation
from typing import Any, Dict # NOQA from typing import Any, Dict # NOQA
from sphinx.application import Sphinx # NOQA from sphinx.application import Sphinx # NOQA
from sphinx.environment import BuildEnvironment # NOQA from sphinx.environment import BuildEnvironment # NOQA

View File

@ -10,8 +10,6 @@
:license: BSD, see LICENSE for details. :license: BSD, see LICENSE for details.
""" """
from typing import TYPE_CHECKING
from docutils import nodes from docutils import nodes
import sphinx 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.ext.mathbase import setup_math as mathbase_setup
from sphinx.locale import _ from sphinx.locale import _
if False:
if TYPE_CHECKING: # For type annotation
from typing import Any, Dict # NOQA from typing import Any, Dict # NOQA
from sphinx.application import Sphinx # NOQA from sphinx.application import Sphinx # NOQA

View File

@ -11,8 +11,6 @@
:license: BSD, see LICENSE for details. :license: BSD, see LICENSE for details.
""" """
from typing import TYPE_CHECKING
from docutils import nodes from docutils import nodes
import sphinx 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.ext.mathbase import setup_math as mathbase_setup
from sphinx.locale import _ from sphinx.locale import _
if TYPE_CHECKING: if False:
# For type annotation
from typing import Any, Dict # NOQA from typing import Any, Dict # NOQA
from sphinx.application import Sphinx # NOQA from sphinx.application import Sphinx # NOQA

View File

@ -10,12 +10,12 @@
""" """
import warnings import warnings
from typing import TYPE_CHECKING
from sphinx.cmd.quickstart import main as _main from sphinx.cmd.quickstart import main as _main
from sphinx.deprecation import RemovedInSphinx20Warning from sphinx.deprecation import RemovedInSphinx20Warning
if TYPE_CHECKING: if False:
# For type annotation
from typing import Any # NOQA from typing import Any # NOQA

View File

@ -10,11 +10,11 @@ import os
import shutil import shutil
import sys import sys
from io import open from io import open
from typing import TYPE_CHECKING
from six import PY2, text_type from six import PY2, text_type
if TYPE_CHECKING: if False:
# For type annotation
from typing import Any, Callable, IO, List # NOQA from typing import Any, Callable, IO, List # NOQA