def on_finish(self) -> None: last_xml = self.memory_xml.last_xml out_path = os.path.join(self.output_dir, 'index.txt') stats.ensure_dir_exists(os.path.dirname(out_path)) transformed_txt = bytes(self.xslt_txt(last_xml)) with open(out_path, 'wb') as out_file: out_file.write(transformed_txt) print('Generated TXT report (via XSLT):', os.path.abspath(out_path))
def on_finish(self) -> None: last_xml = self.memory_xml.last_xml out_path = os.path.join(self.output_dir, "index.txt") stats.ensure_dir_exists(os.path.dirname(out_path)) transformed_txt = bytes(self.xslt_txt(last_xml)) with open(out_path, "wb") as out_file: out_file.write(transformed_txt) print("Generated TXT report (via XSLT):", os.path.abspath(out_path))
def on_file(self, tree: MypyFile, type_map: Dict[Node, Type]) -> None: last_xml = self.memory_xml.last_xml if last_xml is None: return path = os.path.relpath(tree.path) if path.startswith(".."): return out_path = os.path.join(self.output_dir, "xml", path + ".xml") stats.ensure_dir_exists(os.path.dirname(out_path)) last_xml.write(out_path, encoding="utf-8")
def on_file(self, tree: MypyFile, type_map: Dict[Node, Type]) -> None: last_xml = self.memory_xml.last_xml if last_xml is None: return path = os.path.relpath(tree.path) if path.startswith('..'): return out_path = os.path.join(self.output_dir, 'xml', path + '.xml') stats.ensure_dir_exists(os.path.dirname(out_path)) last_xml.write(out_path, encoding='utf-8')
def on_file(self, tree: MypyFile, type_map: Dict[Expression, Type]) -> None: last_xml = self.memory_xml.last_xml if last_xml is None: return path = os.path.relpath(tree.path) if path.startswith('..'): return out_path = os.path.join(self.output_dir, 'xml', path + '.xml') stats.ensure_dir_exists(os.path.dirname(out_path)) last_xml.write(out_path, encoding='utf-8')
def on_file(self, tree: MypyFile, type_map: Dict[Node, Type]) -> None: last_xml = self.memory_xml.last_xml if last_xml is None: return path = os.path.relpath(tree.path) if path.startswith(".."): return out_path = os.path.join(self.output_dir, "html", path + ".html") stats.ensure_dir_exists(os.path.dirname(out_path)) transformed_html = bytes(self.xslt_html(last_xml, ext=self.param_html)) with open(out_path, "wb") as out_file: out_file.write(transformed_html)
def on_file(self, tree: MypyFile, type_map: Dict[Node, Type]) -> None: last_xml = self.memory_xml.last_xml if last_xml is None: return path = os.path.relpath(tree.path) if path.startswith('..'): return out_path = os.path.join(self.output_dir, 'html', path + '.html') stats.ensure_dir_exists(os.path.dirname(out_path)) transformed_html = bytes(self.xslt_html(last_xml, ext=self.param_html)) with open(out_path, 'wb') as out_file: out_file.write(transformed_html)
def on_file(self, tree: MypyFile, type_map: Dict[Expression, Type]) -> None: last_xml = self.memory_xml.last_xml if last_xml is None: return path = os.path.relpath(tree.path) if path.startswith('..'): return out_path = os.path.join(self.output_dir, 'html', path + '.html') stats.ensure_dir_exists(os.path.dirname(out_path)) transformed_html = bytes(self.xslt_html(last_xml, ext=self.param_html)) with open(out_path, 'wb') as out_file: out_file.write(transformed_html)
def __init__(self, reports: Reports, output_dir: str) -> None: self.output_dir = output_dir if output_dir != '<memory>': stats.ensure_dir_exists(output_dir)
def __init__(self, reports: Reports, output_dir: str) -> None: super().__init__(reports, output_dir) self.lines_covered = {} # type: Dict[str, List[int]] stats.ensure_dir_exists(output_dir)
def __init__(self, reports: Reports, output_dir: str) -> None: super().__init__(reports, output_dir) self.counts = {} # type: Dict[str, Tuple[int, int]] self.any_types_counter = { } # type: Dict[str, typing.Counter[TypeOfAny]] stats.ensure_dir_exists(output_dir)
def __init__(self, reports: Reports, output_dir: str) -> None: super().__init__(reports, output_dir) self.counts = {} # type: Dict[str, Tuple[int, int, int, int]] stats.ensure_dir_exists(output_dir)
def __init__(self, reports: Reports, output_dir: str) -> None: super().__init__(reports, output_dir) self.counts = {} # type: Dict[str, Tuple[int, int]] self.any_types_counter = {} # type: Dict[str, typing.Counter[TypeOfAny]] stats.ensure_dir_exists(output_dir)