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

Function main

doc/postprocess.py:7–25  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

5
6
7def main():
8 import argparse
9
10 parser = argparse.ArgumentParser(description=__doc__)
11 parser.add_argument('mode', help='file mode', choices=('html', 'tex'))
12 parser.add_argument('file', nargs='+', help='input file(s)')
13 args = parser.parse_args()
14
15 mode = args.mode
16
17 for fn in args.file:
18 with open(fn, encoding="utf-8") as f:
19 if mode == 'html':
20 lines = process_html(fn, f.readlines())
21 elif mode == 'tex':
22 lines = process_tex(f.readlines())
23
24 with open(fn, 'w', encoding="utf-8") as f:
25 f.write("".join(lines))
26
27def process_html(fn, lines):
28 return lines

Callers 1

postprocess.pyFile · 0.70

Calls 5

openFunction · 0.85
process_htmlFunction · 0.85
process_texFunction · 0.85
joinMethod · 0.80
writeMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…