summaryrefslogtreecommitdiff
path: root/sphinx/writers/html5.py
diff options
context:
space:
mode:
authorTakeshi KOMIYA <i.tkomiya@gmail.com>2020-03-07 11:30:01 +0900
committerTakeshi KOMIYA <i.tkomiya@gmail.com>2020-03-07 19:36:41 +0900
commit941bf951acda5a27b6ff5adef6678c974b6615ba (patch)
tree21ebcfdeac2d917763b1bb155c08e9da9d4a548f /sphinx/writers/html5.py
parent3b87df07ff0e875564684cf278427e31d7d4548d (diff)
downloadsphinx-git-941bf951acda5a27b6ff5adef6678c974b6615ba.tar.gz
Hello TYPE_CHECKING!
Diffstat (limited to 'sphinx/writers/html5.py')
-rw-r--r--sphinx/writers/html5.py5
1 files changed, 2 insertions, 3 deletions
diff --git a/sphinx/writers/html5.py b/sphinx/writers/html5.py
index bb8fb66a7..164ec3659 100644
--- a/sphinx/writers/html5.py
+++ b/sphinx/writers/html5.py
@@ -12,7 +12,7 @@ import os
import posixpath
import warnings
from typing import Any, Iterable, Tuple
-from typing import cast
+from typing import TYPE_CHECKING, cast
from docutils import nodes
from docutils.nodes import Element, Node, Text
@@ -26,8 +26,7 @@ from sphinx.util import logging
from sphinx.util.docutils import SphinxTranslator
from sphinx.util.images import get_image_size
-if False:
- # For type annotation
+if TYPE_CHECKING:
from sphinx.builders.html import StandaloneHTMLBuilder