(
self,
tree: MypyFile,
modules: dict[str, MypyFile],
type_map: dict[Expression, Type],
options: Options,
)
| 775 | self.param_html = etree.XSLT.strparam("html") |
| 776 | |
| 777 | def on_file( |
| 778 | self, |
| 779 | tree: MypyFile, |
| 780 | modules: dict[str, MypyFile], |
| 781 | type_map: dict[Expression, Type], |
| 782 | options: Options, |
| 783 | ) -> None: |
| 784 | last_xml = self.memory_xml.last_xml |
| 785 | if last_xml is None: |
| 786 | return |
| 787 | path = os.path.relpath(tree.path) |
| 788 | if path.startswith(".."): |
| 789 | return |
| 790 | out_path = os.path.join(self.output_dir, "html", path + ".html") |
| 791 | os.makedirs(os.path.dirname(out_path), exist_ok=True) |
| 792 | transformed_html = bytes(self.xslt_html(last_xml, ext=self.param_html)) |
| 793 | with open(out_path, "wb") as out_file: |
| 794 | out_file.write(transformed_html) |
| 795 | |
| 796 | def on_finish(self) -> None: |
| 797 | last_xml = self.memory_xml.last_xml |
nothing calls this directly
no test coverage detected