diff --git a/mypy/report.py b/mypy/report.py index 3dc509ff6058..bf52a7346868 100644 --- a/mypy/report.py +++ b/mypy/report.py @@ -135,10 +135,8 @@ def on_file(self, tree: MypyFile, type_map: Dict[Node, Type]) -> None: content=line_text[:-1]) # Assumes a layout similar to what XmlReporter uses. xslt_path = os.path.relpath('mypy-html.xslt', path) - xml_pi = etree.ProcessingInstruction('xml', 'version="1.0" encoding="utf-8"') transform_pi = etree.ProcessingInstruction('xml-stylesheet', 'type="text/xsl" href="%s"' % cgi.escape(xslt_path, True)) - root.addprevious(xml_pi) root.addprevious(transform_pi) self.schema.assertValid(doc) @@ -162,10 +160,8 @@ def on_finish(self) -> None: name=file_info.name, module=file_info.module) xslt_path = os.path.relpath('mypy-html.xslt', '.') - xml_pi = etree.ProcessingInstruction('xml', 'version="1.0" encoding="utf-8"') transform_pi = etree.ProcessingInstruction('xml-stylesheet', 'type="text/xsl" href="%s"' % cgi.escape(xslt_path, True)) - root.addprevious(xml_pi) root.addprevious(transform_pi) self.schema.assertValid(doc)