MCPcopy Create free account
hub / github.com/ROCm/AMDMIGraphX / main

Function main

tools/format.py:79–96  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

77
78
79def main():
80 parser = argparse.ArgumentParser()
81 parser.add_argument('against', default='develop', nargs='?')
82 parser.add_argument('-i', '--in-place', action='store_true')
83 parser.add_argument('-q', '--quiet', action='store_true')
84 args = parser.parse_args()
85 try:
86 clang_format(args.against, apply=args.in_place)
87 yapf_format(args.against, apply=args.in_place)
88 except subprocess.CalledProcessError as ex:
89 if ex.stdout:
90 print(ex.stdout)
91 if ex.stderr:
92 print(ex.stderr)
93 if not args.quiet:
94 print(f"Command '{ex.cmd}' returned {ex.returncode}")
95 raise
96 # sys.exit(ex.returncode)
97
98
99if __name__ == "__main__":

Callers 1

format.pyFile · 0.70

Calls 3

yapf_formatFunction · 0.85
clang_formatFunction · 0.70
printFunction · 0.50

Tested by

no test coverage detected