MCPcopy Index your code
hub / github.com/python/mypy / on_finish

Method on_finish

mypy/report.py:796–805  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

794 out_file.write(transformed_html)
795
796 def on_finish(self) -> None:
797 last_xml = self.memory_xml.last_xml
798 assert last_xml is not None
799 out_path = os.path.join(self.output_dir, "index.html")
800 out_css = os.path.join(self.output_dir, "mypy-html.css")
801 transformed_html = bytes(self.xslt_html(last_xml, ext=self.param_html))
802 with open(out_path, "wb") as out_file:
803 out_file.write(transformed_html)
804 shutil.copyfile(self.memory_xml.css_html_path, out_css)
805 print("Generated HTML report (via XSLT):", os.path.abspath(out_path))
806
807
808register_reporter("xslt-html", XsltHtmlReporter, needs_lxml=True)

Callers

nothing calls this directly

Calls 4

bytesClass · 0.85
printFunction · 0.85
joinMethod · 0.45
writeMethod · 0.45

Tested by

no test coverage detected