summaryrefslogtreecommitdiff
path: root/sphinx/builders/xml.py
diff options
context:
space:
mode:
authorTakeshi KOMIYA <i.tkomiya@gmail.com>2021-04-10 00:32:26 +0900
committerGitHub <noreply@github.com>2021-04-10 00:32:26 +0900
commitfe6d95e4294f47d61f1a04a1f8c6567c9802f504 (patch)
tree33a7143bf1dcf60830c2e1fcd4b396175af45e64 /sphinx/builders/xml.py
parent7327e56dff865d4766c43d46405ae827e10fd6c3 (diff)
parentce5d66e618c111b115a9bb7b1401a26483fcfa8f (diff)
downloadsphinx-git-fe6d95e4294f47d61f1a04a1f8c6567c9802f504.tar.gz
Merge branch 'master' into patch-1
Diffstat (limited to 'sphinx/builders/xml.py')
-rw-r--r--sphinx/builders/xml.py9
1 files changed, 2 insertions, 7 deletions
diff --git a/sphinx/builders/xml.py b/sphinx/builders/xml.py
index 1b051119b..865820c36 100644
--- a/sphinx/builders/xml.py
+++ b/sphinx/builders/xml.py
@@ -9,7 +9,7 @@
"""
from os import path
-from typing import Any, Dict, Iterator, Set, Union
+from typing import Any, Dict, Iterator, Set, Type, Union
from docutils import nodes
from docutils.io import StringOutput
@@ -23,11 +23,6 @@ from sphinx.util import logging
from sphinx.util.osutil import ensuredir, os_path
from sphinx.writers.xml import PseudoXMLWriter, XMLWriter
-if False:
- # For type annotation
- from typing import Type # for python3.5.1
-
-
logger = logging.getLogger(__name__)
@@ -42,7 +37,7 @@ class XMLBuilder(Builder):
out_suffix = '.xml'
allow_parallel = True
- _writer_class = XMLWriter # type: Union[Type[XMLWriter], Type[PseudoXMLWriter]]
+ _writer_class: Union[Type[XMLWriter], Type[PseudoXMLWriter]] = XMLWriter
default_translator_class = XMLTranslator
def init(self) -> None: