diff --git a/mypy/report.py b/mypy/report.py index 74b44ac1f995..157aa1caab6f 100644 --- a/mypy/report.py +++ b/mypy/report.py @@ -334,7 +334,7 @@ def on_file(self, etree.SubElement(root, 'line', number=str(lineno), precision=stats.precision_names[status], - content=line_text[:-1]) + content=line_text.rstrip('\n')) # Assumes a layout similar to what XmlReporter uses. xslt_path = os.path.relpath('mypy-html.xslt', path) transform_pi = etree.ProcessingInstruction('xml-stylesheet',