summaryrefslogtreecommitdiff
path: root/sphinx/writers/xml.py
diff options
context:
space:
mode:
Diffstat (limited to 'sphinx/writers/xml.py')
-rw-r--r--sphinx/writers/xml.py14
1 files changed, 6 insertions, 8 deletions
diff --git a/sphinx/writers/xml.py b/sphinx/writers/xml.py
index 1de1100c3..9560c4006 100644
--- a/sphinx/writers/xml.py
+++ b/sphinx/writers/xml.py
@@ -1,4 +1,3 @@
-# -*- coding: utf-8 -*-
"""
sphinx.writers.xml
~~~~~~~~~~~~~~~~~~
@@ -9,7 +8,6 @@
:license: BSD, see LICENSE for details.
"""
-from docutils import writers
from docutils.writers.docutils_xml import Writer as BaseXMLWriter
if False:
@@ -22,7 +20,7 @@ class XMLWriter(BaseXMLWriter):
def __init__(self, builder):
# type: (Builder) -> None
- BaseXMLWriter.__init__(self)
+ super().__init__()
self.builder = builder
self.translator_class = self.builder.get_translator_class()
@@ -33,23 +31,23 @@ class XMLWriter(BaseXMLWriter):
self.builder.env.config.xml_pretty
self.document.settings.xml_declaration = True
self.document.settings.doctype_declaration = True
- return BaseXMLWriter.translate(self)
+ return super().translate()
-class PseudoXMLWriter(writers.Writer):
+class PseudoXMLWriter(BaseXMLWriter):
supported = ('pprint', 'pformat', 'pseudoxml')
"""Formats this writer supports."""
config_section = 'pseudoxml writer'
- config_section_dependencies = ('writers',) # type: Tuple[unicode]
+ config_section_dependencies = ('writers',)
output = None
"""Final translated form of `document`."""
def __init__(self, builder):
# type: (Builder) -> None
- writers.Writer.__init__(self)
+ super().__init__()
self.builder = builder
def translate(self):
@@ -57,6 +55,6 @@ class PseudoXMLWriter(writers.Writer):
self.output = self.document.pformat()
def supports(self, format):
- # type: (unicode) -> bool
+ # type: (str) -> bool
"""This writer supports all format-specific elements."""
return True