Skip to content

Commit e528f92

Browse files
committed
Merge pull request #1120 from JukkaL/fix1002
Hopeful fix for #1002 (lxml trouble).
2 parents 86974b1 + 31e5d16 commit e528f92

File tree

1 file changed

+0
-4
lines changed

1 file changed

+0
-4
lines changed

mypy/report.py

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -135,10 +135,8 @@ def on_file(self, tree: MypyFile, type_map: Dict[Node, Type]) -> None:
135135
content=line_text[:-1])
136136
# Assumes a layout similar to what XmlReporter uses.
137137
xslt_path = os.path.relpath('mypy-html.xslt', path)
138-
xml_pi = etree.ProcessingInstruction('xml', 'version="1.0" encoding="utf-8"')
139138
transform_pi = etree.ProcessingInstruction('xml-stylesheet',
140139
'type="text/xsl" href="%s"' % cgi.escape(xslt_path, True))
141-
root.addprevious(xml_pi)
142140
root.addprevious(transform_pi)
143141
self.schema.assertValid(doc)
144142

@@ -162,10 +160,8 @@ def on_finish(self) -> None:
162160
name=file_info.name,
163161
module=file_info.module)
164162
xslt_path = os.path.relpath('mypy-html.xslt', '.')
165-
xml_pi = etree.ProcessingInstruction('xml', 'version="1.0" encoding="utf-8"')
166163
transform_pi = etree.ProcessingInstruction('xml-stylesheet',
167164
'type="text/xsl" href="%s"' % cgi.escape(xslt_path, True))
168-
root.addprevious(xml_pi)
169165
root.addprevious(transform_pi)
170166
self.schema.assertValid(doc)
171167

0 commit comments

Comments
 (0)