Ejemplo n.º 1
0
 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))
Ejemplo n.º 2
0
 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))
Ejemplo n.º 3
0
 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")
Ejemplo n.º 4
0
 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')
Ejemplo n.º 5
0
 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')
Ejemplo n.º 6
0
 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)
Ejemplo n.º 7
0
 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)
Ejemplo n.º 8
0
 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)
Ejemplo n.º 9
0
 def __init__(self, reports: Reports, output_dir: str) -> None:
     self.output_dir = output_dir
     if output_dir != '<memory>':
         stats.ensure_dir_exists(output_dir)
Ejemplo n.º 10
0
    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)
Ejemplo n.º 11
0
 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)
Ejemplo n.º 12
0
    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)
Ejemplo n.º 13
0
    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)
Ejemplo n.º 14
0
    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)
Ejemplo n.º 15
0
 def __init__(self, reports: Reports, output_dir: str) -> None:
     self.output_dir = output_dir
     if output_dir != '<memory>':
         stats.ensure_dir_exists(output_dir)
Ejemplo n.º 16
0
 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)