diff options
author | Takeshi KOMIYA <i.tkomiya@gmail.com> | 2018-02-14 22:57:20 +0900 |
---|---|---|
committer | Takeshi KOMIYA <i.tkomiya@gmail.com> | 2018-02-14 22:57:38 +0900 |
commit | a073e17537c2aacaac305feadea58d4473ec97f4 (patch) | |
tree | b3ef3d0ad15132c4e5ae5064f9c7b678fbcad120 /sphinx/io.py | |
parent | 91807f882dafbd6185b8d88c0bf4cbf97cf520fb (diff) | |
download | sphinx-git-a073e17537c2aacaac305feadea58d4473ec97f4.tar.gz |
Use typing.TYPE_CHECKING for typehints
Diffstat (limited to 'sphinx/io.py')
-rw-r--r-- | sphinx/io.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/sphinx/io.py b/sphinx/io.py index 8f1da22bd..88fee462f 100644 --- a/sphinx/io.py +++ b/sphinx/io.py @@ -10,6 +10,7 @@ """ import codecs import re +from typing import TYPE_CHECKING from docutils.core import Publisher from docutils.io import FileInput, NullOutput @@ -33,8 +34,7 @@ from sphinx.transforms.i18n import ( from sphinx.util import logging from sphinx.util.docutils import LoggingReporter -if False: - # For type annotation +if TYPE_CHECKING: from typing import Any, Dict, List, Tuple, Union # NOQA from docutils import nodes # NOQA from docutils.io import Input # NOQA |