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

Function main

numpy/_build_utils/process_src_template.py:36–62  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

34
35
36def main():
37 parser = argparse.ArgumentParser()
38 parser.add_argument(
39 "infile",
40 type=str,
41 help="Path to the input file"
42 )
43 parser.add_argument(
44 "-o",
45 "--outfile",
46 type=str,
47 help="Path to the output file"
48 )
49 parser.add_argument(
50 "-i",
51 "--ignore",
52 type=str,
53 help="An ignored input - may be useful to add a "
54 "dependency between custom targets",
55 )
56 args = parser.parse_args()
57
58 if not args.infile.endswith('.src'):
59 raise ValueError(f"Unexpected extension: {args.infile}")
60
61 outfile_abs = os.path.join(os.getcwd(), args.outfile)
62 process_and_write_file(args.infile, outfile_abs)
63
64
65if __name__ == "__main__":

Callers 1

Calls 3

process_and_write_fileFunction · 0.85
endswithMethod · 0.80
joinMethod · 0.80

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…