summaryrefslogtreecommitdiff
path: root/sphinx/builders/xml.py
diff options
context:
space:
mode:
Diffstat (limited to 'sphinx/builders/xml.py')
-rw-r--r--sphinx/builders/xml.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/sphinx/builders/xml.py b/sphinx/builders/xml.py
index 4bc0d27e2..3fdc21244 100644
--- a/sphinx/builders/xml.py
+++ b/sphinx/builders/xml.py
@@ -23,7 +23,8 @@ from sphinx.writers.xml import XMLWriter, PseudoXMLWriter
if False:
# For type annotation
- from typing import Any, Dict, Iterator, Set # NOQA
+ from typing import Any, Dict, Iterator, Set, Type # NOQA
+ from docutils.writers.xml import BaseXMLWriter # NOQA
from sphinx.application import Sphinx # NOQA
from sphinx.util.typing import unicode # NOQA
@@ -41,7 +42,7 @@ class XMLBuilder(Builder):
out_suffix = '.xml'
allow_parallel = True
- _writer_class = XMLWriter
+ _writer_class = XMLWriter # type: Type[BaseXMLWriter]
default_translator_class = XMLTranslator
def init(self):