| 747 | last_xml.write(out_path, encoding="utf-8") |
| 748 | |
| 749 | def on_finish(self) -> None: |
| 750 | last_xml = self.memory_xml.last_xml |
| 751 | assert last_xml is not None |
| 752 | out_path = os.path.join(self.output_dir, "index.xml") |
| 753 | out_xslt = os.path.join(self.output_dir, "mypy-html.xslt") |
| 754 | out_css = os.path.join(self.output_dir, "mypy-html.css") |
| 755 | last_xml.write(out_path, encoding="utf-8") |
| 756 | shutil.copyfile(self.memory_xml.xslt_html_path, out_xslt) |
| 757 | shutil.copyfile(self.memory_xml.css_html_path, out_css) |
| 758 | print("Generated XML report:", os.path.abspath(out_path)) |
| 759 | |
| 760 | |
| 761 | register_reporter("xml", XmlReporter, needs_lxml=True) |