(
self,
tree: MypyFile,
modules: dict[str, MypyFile],
type_map: dict[Expression, Type],
options: Options,
)
| 730 | """ |
| 731 | |
| 732 | def on_file( |
| 733 | self, |
| 734 | tree: MypyFile, |
| 735 | modules: dict[str, MypyFile], |
| 736 | type_map: dict[Expression, Type], |
| 737 | options: Options, |
| 738 | ) -> None: |
| 739 | last_xml = self.memory_xml.last_xml |
| 740 | if last_xml is None: |
| 741 | return |
| 742 | path = os.path.relpath(tree.path) |
| 743 | if path.startswith(".."): |
| 744 | return |
| 745 | out_path = os.path.join(self.output_dir, "xml", path + ".xml") |
| 746 | os.makedirs(os.path.dirname(out_path), exist_ok=True) |
| 747 | last_xml.write(out_path, encoding="utf-8") |
| 748 | |
| 749 | def on_finish(self) -> None: |
| 750 | last_xml = self.memory_xml.last_xml |
no test coverage detected