MCPcopy Index your code
hub / github.com/NVIDIA/TensorRT-LLM / main

Function main

scripts/format_test_list.py:25–44  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

23
24
25def main():
26 parser = argparse.ArgumentParser(
27 description='Normalize tabs and multiple spaces to single spaces')
28 parser.add_argument('filenames', nargs='*', help='Filenames to fix')
29 args = parser.parse_args()
30
31 retval = 0
32 for filename in args.filenames:
33 with open(filename, 'r', encoding='utf-8') as f:
34 original_contents = f.read()
35
36 normalized_contents = normalize_whitespace(original_contents)
37
38 if original_contents != normalized_contents:
39 print(f'Fixing {filename}')
40 with open(filename, 'w', encoding='utf-8') as f:
41 f.write(normalized_contents)
42 retval = 1
43
44 return retval
45
46
47if __name__ == '__main__':

Callers 1

Calls 1

normalize_whitespaceFunction · 0.85

Tested by

no test coverage detected