diff options
author | Takeshi KOMIYA <i.tkomiya@gmail.com> | 2018-02-14 16:57:20 +0300 |
---|---|---|
committer | Takeshi KOMIYA <i.tkomiya@gmail.com> | 2018-02-14 16:57:38 +0300 |
commit | a073e17537c2aacaac305feadea58d4473ec97f4 (patch) | |
tree | b3ef3d0ad15132c4e5ae5064f9c7b678fbcad120 /sphinx/parsers.py | |
parent | 91807f882dafbd6185b8d88c0bf4cbf97cf520fb (diff) |
Use typing.TYPE_CHECKING for typehints
Diffstat (limited to 'sphinx/parsers.py')
-rw-r--r-- | sphinx/parsers.py | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/sphinx/parsers.py b/sphinx/parsers.py index 34822898f..57344ddb3 100644 --- a/sphinx/parsers.py +++ b/sphinx/parsers.py @@ -9,14 +9,15 @@ :license: BSD, see LICENSE for details. """ +from typing import TYPE_CHECKING + import docutils.parsers import docutils.parsers.rst from docutils.parsers.rst import states from docutils.statemachine import StringList from docutils.transforms.universal import SmartQuotes -if False: - # For type annotation +if TYPE_CHECKING: from typing import Any, Dict, List, Type # NOQA from docutils import nodes # NOQA from docutils.transforms import Transform # NOQA |