summaryrefslogtreecommitdiff
path: root/sphinx/builders/html.py
diff options
context:
space:
mode:
authorjfbu <jfbu@free.fr>2019-08-01 17:49:24 +0200
committerjfbu <jfbu@free.fr>2019-08-01 17:49:24 +0200
commit685e3fdb49c42b464e09ec955e1033e2a8729fff (patch)
treea7ad90fbd9c2a076575f612caf0d6baa7c4fb555 /sphinx/builders/html.py
parenteeca5ee91d2da817d4ad9e920ad7e4cabd966d08 (diff)
parent5a86a71a8fe6d4e8c3861f755cc9b05b5b10f0cf (diff)
downloadsphinx-git-685e3fdb49c42b464e09ec955e1033e2a8729fff.tar.gz
Merge branch '2.0'
Diffstat (limited to 'sphinx/builders/html.py')
-rw-r--r--sphinx/builders/html.py9
1 files changed, 7 insertions, 2 deletions
diff --git a/sphinx/builders/html.py b/sphinx/builders/html.py
index 2ce5c0315..84ef2a9f9 100644
--- a/sphinx/builders/html.py
+++ b/sphinx/builders/html.py
@@ -15,7 +15,7 @@ import sys
import warnings
from hashlib import md5
from os import path
-from typing import Any, Dict, IO, Iterable, Iterator, List, Set, Type, Tuple
+from typing import Any, Dict, IO, Iterable, Iterator, List, Set, Tuple
from docutils import nodes
from docutils.core import publish_parts
@@ -48,6 +48,11 @@ from sphinx.util.osutil import os_path, relative_uri, ensuredir, movefile, copyf
from sphinx.util.tags import Tags
from sphinx.writers.html import HTMLWriter, HTMLTranslator
+if False:
+ # For type annotation
+ from typing import Type # for python3.5.1
+
+
# HTML5 Writer is available or not
if is_html5_writer_available():
from sphinx.writers.html5 import HTML5Translator
@@ -302,7 +307,7 @@ class StandaloneHTMLBuilder(Builder):
self.script_files.append(JavaScript(filename, **kwargs))
@property
- def default_translator_class(self) -> Type[nodes.NodeVisitor]: # type: ignore
+ def default_translator_class(self) -> "Type[nodes.NodeVisitor]": # type: ignore
if not html5_ready or self.config.html4_writer:
return HTMLTranslator
else: