Skip to content

Hopeful fix for #1002 (lxml trouble). #1120

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jan 13, 2016
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 0 additions & 4 deletions mypy/report.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Expand All @@ -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)

Expand Down