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/ext/graphviz.py | |
parent | 91807f882dafbd6185b8d88c0bf4cbf97cf520fb (diff) | |
download | sphinx-git-a073e17537c2aacaac305feadea58d4473ec97f4.tar.gz |
Use typing.TYPE_CHECKING for typehints
Diffstat (limited to 'sphinx/ext/graphviz.py')
-rw-r--r-- | sphinx/ext/graphviz.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/sphinx/ext/graphviz.py b/sphinx/ext/graphviz.py index 2986bf9c1..da3e55b60 100644 --- a/sphinx/ext/graphviz.py +++ b/sphinx/ext/graphviz.py @@ -16,6 +16,7 @@ import re from hashlib import sha1 from os import path from subprocess import Popen, PIPE +from typing import TYPE_CHECKING from docutils import nodes from docutils.parsers.rst import Directive, directives @@ -29,8 +30,7 @@ from sphinx.util import logging from sphinx.util.i18n import search_image_for_language from sphinx.util.osutil import ensuredir, ENOENT, EPIPE, EINVAL -if False: - # For type annotation +if TYPE_CHECKING: from typing import Any, Dict, List, Tuple # NOQA from sphinx.application import Sphinx # NOQA |