MCPcopy Index your code
hub / github.com/numpy/numpy / write_html

Method write_html

tools/c_coverage/c_coverage_report.py:99–113  ·  view source on GitHub ↗
(self, root)

Source from the content-addressed store, hash-verified

97 source.write_text(fd)
98
99 def write_html(self, root):
100 for path, source in self.files.items():
101 with open(
102 os.path.join(root, self.clean_path(path) + ".html"), "w"
103 ) as fd:
104 source.write_html(fd)
105
106 with open(os.path.join(root, 'index.html'), 'w') as fd:
107 fd.write("<html>")
108 paths = sorted(self.files.keys())
109 for path in paths:
110 href = self.clean_path(path)
111 label = escape(path[len(self.prefix):])
112 fd.write(f'<p><a href="{href}.html">{label}</a></p>')
113 fd.write("</html>")
114
115
116def collect_stats(files, fd, pattern):

Callers

nothing calls this directly

Calls 7

clean_pathMethod · 0.95
openFunction · 0.85
itemsMethod · 0.80
joinMethod · 0.80
write_htmlMethod · 0.45
writeMethod · 0.45
keysMethod · 0.45

Tested by

no test coverage detected