示例#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))
示例#2
0
文件: report.py 项目: JdeH/Transcrypt
 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))
示例#3
0
文件: report.py 项目: JdeH/Transcrypt
 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")
示例#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')
示例#5
0
文件: report.py 项目: alexandrul/mypy
 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')
示例#6
0
文件: report.py 项目: JdeH/Transcrypt
 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)
示例#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)
示例#8
0
文件: report.py 项目: alexandrul/mypy
 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)
示例#9
0
文件: report.py 项目: zadaya/CourseTB
 def __init__(self, reports: Reports, output_dir: str) -> None:
     self.output_dir = output_dir
     if output_dir != '<memory>':
         stats.ensure_dir_exists(output_dir)
示例#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)
示例#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)
示例#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)
示例#13
0
文件: report.py 项目: JdeH/Transcrypt
    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)
示例#14
0
文件: report.py 项目: JdeH/Transcrypt
    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)
示例#15
0
文件: report.py 项目: chadrik/mypy
 def __init__(self, reports: Reports, output_dir: str) -> None:
     self.output_dir = output_dir
     if output_dir != '<memory>':
         stats.ensure_dir_exists(output_dir)
示例#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)