MCPcopy Create free account
hub / github.com/numpy/numpy / main

Function main

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

Source from the content-addressed store, hash-verified

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

Callers 1

Calls 3

process_and_write_fileFunction · 0.85
endswithMethod · 0.80
joinMethod · 0.45

Tested by

no test coverage detected